RE: [PHP-DB] 2 Tables- 1 Insert Problem

2001-07-29 Thread Doug Semig
Beyond that excellent answer, this is exactly the kind of situation where transactions would be helpful (and in a lot of cases, mission critical). So an expanded quasi-pseudocode rendition of olinux's answer could be: $result_bt = mysql_query('[whatever it takes to begin a transaction]');

[PHP-DB] 2 Tables- 1 Insert Problem

2001-07-28 Thread Steve Fitzgerald
I'm trying to insert data into two separate tables using 1 INSERT. The code below represents a first crack at it, but I can't seem to figure out how to get this to work properly. Thanks. Steve ? $db_name=testDB; $table_name1 = my_contacts; $table_name2= company; $connection = @mysql_connect

RE: [PHP-DB] 2 Tables- 1 Insert Problem

2001-07-28 Thread olinux
Not possible. do this $result_1 = mysql_query($sql1) or die('Insert 1 failed'); do this $result_2 = mysql_query($sql2) or die('Insert 2 failed'); olinux -Original Message- From: Steve Fitzgerald [mailto:[EMAIL PROTECTED]] I'm trying to insert data into two separate tables using 1