[Phpmyadmin-devel] How to execute a multi query?
Michal Čihař
michal at cihar.com
Wed May 25 15:49:09 CEST 2011
Hi
Dne Wed, 25 May 2011 14:35:44 +0100
Rouslan Placella <rouslan at placella.com> napsal(a):
> I can't find anywhere a method for changing the delimiter for a query,
> so that I can manipulate stored routines. For example, trying to
> execute:
>
> DELIMITER //
> SELECT NOW()//
>
> with PMA_DBI_query() fails with a syntax error, yet I can change the
> delimiter in the SQL tab, in the input box below the textarea. But it
> looks like the queries typed into the SQL tab are executed by
> import.php.
Yes, import.php is responsible for splitting input into multiple
queries and they are run separately by PMA_DBI_query. So if you need to
split out query, you have to go through import.php.
However if you are generating the query, you should send it part by
part using PMA_DBI_query and just set sql_query to show complete query
in the user interface.
--
Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110525/80207620/attachment.sig>
More information about the Developers
mailing list