jsp - how to insert values in mysql database -


enter image description hereplease 1 help... using jsp mysql database,its isa relation type,i have created table named product has "product_id" primary key, , have created 2 other tables named "spare_parts" , "accessories" doesn't has primary key have foreign key of product table. depending on form submission want insert data in either of tables. please help

as per tutorial: http://www.java2s.com/tutorial/java/0360__jsp/insertdatatoatable.htm

use query as:

insert product(id, name, brand, quantity) values (....)  insert spareparts(productid, weight) values (...)  insert accessories(productid, color) values (....) 

you should merge spareparts , accessories table if no other fields needed.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -