...

View Full Version : inserting data into multiple tables through php?



Mr.47
02-15-2010, 07:02 AM
i have 5 tables in a single html form and i want to insert data into all of them when i click the submit button. how can i do this in php? iam a beginner and i have done insertion for a single table but dont know how to implement this? help me out

abduraooft
02-15-2010, 07:16 AM
how can i do this in php? i Run 5 seperate queries for each table.

Len Whistler
02-15-2010, 07:22 AM
I would also look into how you setup your database. Do you really need 5 tables for one form?




---------------

Mr.47
02-15-2010, 10:01 AM
yeah in the html form wat iam doing is that by filling all the fields i m sending data to 5 differnt tables in the database. tables are product,category,metatag,productdiscount and relatedproduct. how can it be done?

Len Whistler
02-15-2010, 11:00 AM
product,category,metatag,productdiscount and relatedproduct. how can it be done?

I don't know what info metatag has, and I'm not sure about related_product but the other 3 should be able to go in one table.

Table 1

product_id | product_name | product_category | product_discount
001 | Canon 5d | DSLR | 10
002 | Canon 7d DSLR | 5
003 | 200mm | Lens | 5
004 | 300mm | Lens | 20


-----------------



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum