Inserting data into multiple Table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pavanesh2009
Forum Commoner
Posts: 30
Joined: Wed Jan 13, 2010 7:24 am

Inserting data into multiple Table

Post by pavanesh2009 »

Hello Everyone!!

I need to insert data into three table through single submission of a form,(obviously table are related to each other), Please suggest how I can make out this?

Thanks in Advance!!
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Inserting data into multiple Table

Post by McInfo »

Use three queries.

Edit: This post was recovered from search engine cache.
Last edited by McInfo on Thu Jun 17, 2010 4:31 pm, edited 1 time in total.
User avatar
tr0gd0rr
Forum Contributor
Posts: 305
Joined: Thu May 11, 2006 8:58 pm
Location: Utah, USA

Re: Inserting data into multiple Table

Post by tr0gd0rr »

Also you may want to use a transaction around the 3 queries.
Post Reply