Php Mysql Insert Into Two Tables With One Query

RegisterLogin
Php Mysql Insert Into Two Tables With One Query
Post Description: how i can send one query in my php script using mysql database. i want to insert data into two/multiple tables win just one command
Tags: php, mysql, insert, into, two, tables, with, one, query
This Post Was Posted On Aug 26, 2010 By Dounger #3530
hi i wanted to know if you can show me how i can send one query in my php script using mysql database. i want to insert data into two/multiple tables win just one command. is that possible, and if it is possible can you please show me the code i need to use for inserting correctly into mysql database. i thank you in advance for your help.

i was i reading myself, i want to make sure i make sense ok, because i know what you are going to ask. can you give me example.. hahahah, so her it is

$Query = "INSERT INTO students name='andrew'";
$Query2 = "INSERT INTO books owner='andrew'";

ok, as you can see, i would have to do two queries in order to put data into two different tables, but i want to be able to do the query only once. like i said, i dont know if its even possible, but i would like it if the system was updating the 2 databases tables with just one string.

thanks again
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Sun Dec 18, 2011 6:32 pm
Powered by: Webune Forums V3