Forum Moderators: coopster
In an attempt to streamline some code (php) I would like to run multple insert commands. I have no problem getting the code to work if I call two separate SQL scripts eg.
$sql1 = "INSERT INTO tableX.....";
$pResult=mysql_query( $sql1 , $db_connection );
$sql2 = "INSERT INTO tableY.....";
$pResult=mysql_query( $sql2 , $db_connection );
mysql_close($db_connection)
But when I try the following method it falls down. I get a parse error. Is there some reason why the following would not work.
$sql = "INSERT INTO tableX....;
INSERT INTO tableY....";
$pResult=mysql_query( $sql , $db_connection ); etc ect
Cheers