Re: Batch queries in the same mysql_query()

From: Date: Wed, 29 Jun 2005 02:32:28 +0000
Subject: Re: Batch queries in the same mysql_query()
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-39818@lists.php.net to get a copy of this message
I'm trying to execute multiple queries using mysql_query() function and I'm getting an error to check SQL syntax. My PHP code looks like:
You cannot execute multiple queries at once using mysql_query(). If you are using PHP 5.x and MySQL 4.1.x, there are new functions, one of which does allow for multiple queries to be executed in one function call.
Maybe the problem resides on the character ";", but this queries run without problems when typed on "mysql" command-line tool. So, if it works on "mysql" command line, why it doesn't work using mysql_query() ?
Because the mysql client and PHP's mysql_query() functions are two different things that behave somewhat differently. Larry

« previous php.db (#39818) next »