Hi guys:
This is probably an off-topic, and more related to PHP, but it is related to
mysql as well
I need to execute two insert queries into a single statement from a PHP
application, but it keeps giving me an error.
I have found this page
(http://dev.mysql.com/doc/mysql/en/c-api-multiple-queries.html), but I don´t
know how to implement it:
"From version 4.1, MySQL supports the execution of multiple statements
specified in a single query string. To use this capability with a given
connection, you must specify the CLIENT_MULTI_STATEMENTS option in the flags
parameter of mysql_real_connect() when opening the connection. You can also
set this for an existing connection by calling MySQL Reference Manual ::
23.2.9 C API Handling of Multiple Query Execution mysql_set_server_option
MYSQL_OPTION_MULTI_STATEMENTS_ON) By default, mysql_query() and
mysql_real_query() return only the first query status and the subsequent
queries status can be processed using mysql_more_results() and
mysql_next_result()"
Does anybody has tried it in php. Does anyone could share an example.
Thanks and best regards.
Alvaro.