Re: Batch queries in the same mysql_query()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux