I'd like to be able to run a mysql_query() once while executing more than one mysql command... for example:
while($row = mysql_fetch_array($result)) { $query_cmd = "INSERT INTO tblTest1 (number) VALUES (1);"; $query_cmd .= "INSERT INTO tblTest2 (id, val) VALUES(LAST_INSERT_ID, 'some data');"; mysql_query($query_cmd); } When I run code similar to that listed above, I get a mysql error "error at line 1." -- however, if I run the INSERTS separately -- no error. Is there a way I can run multiple commands within one string? Thanks Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php