PDA

View Full Version : Possible to add data into 2 tables in 1 query?


HakkieDEV
07-11-2004, 09:38 PM
Well, I would like to add the same data into 2 tables in just 1 query.

Is this possible or should I use 2 querys?

I tried to do something like:

$DB_site->query("INSERT INTO tablename1, tablename2 (threadid,userid,username,customfield1,customfield 2) VALUES('".$threadinfo['threadid']."','".$bbuserinfo['userid']."','".$customfield1."','".$customfield2."')");

But that didn't work. :(

Dark_Wizard
07-11-2004, 10:12 PM
It's not possible...you need 2 queries.

HakkieDEV
07-12-2004, 04:22 PM
It's not possible...you need 2 queries.
Ok, thanks for your help mate!