Please, if you've ever run into anything like this before-- is this a PHP bug?
why does this work:
$query = "UPDATE data SET title = 'foo' WHERE id = '1'; ";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
but this fails, throwing a MySql syntax error:
$query = "UPDATE data SET title = 'foo' WHERE id = '1'; UPDATE data SET title = 'bar' WHERE id = '2'; ";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
the error is :
Query failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; UPDATE data SET title = 'bar' WHERE id = '2'' at line 1
the same multi-statement query works fine in a shell, but fails in PHP