Hey there, I'd like to insert into two tables simultaneously, where the value of the first column in the first table is the same as the value of the second column in the second table. Here's an example of what I'm trying to achieve:
Table 1
pri_ID, some_data
10,words
11,something
Table 2
sec_ID, pri_ID, other_data
1,10,morewords
2,11,somethinge lse
Both pri_ID and sec_ID are auto increments, and some_data/more_data are inserted from php. The whole statement will be wrapped in ADOdb functions.
Please let me know if I need to give any more info. Thanks for your time!
Table 1
pri_ID, some_data
10,words
11,something
Table 2
sec_ID, pri_ID, other_data
1,10,morewords
2,11,somethinge lse
Both pri_ID and sec_ID are auto increments, and some_data/more_data are inserted from php. The whole statement will be wrapped in ADOdb functions.
Code:
$DB->BeginTrans();
$DB->Execute("SQL STATEMENT GOES HERE");
$DB->CommitTrans();
Comment