Now that MySQL has different table types which support transactions
(bdb, gemini) it's desirable to build transaction blocks for MySQL PHP
driven programs, just like you can for PostgreSQL.

When I tried to do this, however, I couldn't find a MySQL equivalent for
pg_Exec, which does except multiple SQL statements.

mysql_db_query & mysql_query apparently accept only a single SQL

If I try to execute the following, it fails with a syntax error at the
end of the first statement:

=       =       =       =       =       
$transaction_sql = "BEGIN;
                    COMMIT; ";
include "";
$result = mysql_db_query("inventory", $transaction_sql, $conn);
=       =       =       =       =       =
With PostgreSQL, it works fine (after you change mysql_db_query to

So, does anyone know of a way to execute multiple SQL statements with
MySQL or am I forced to execute one at a time?

Thanks in advance,


PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to