Bug #54211 [Opn->Bgs]: delimiter ends with syntax error
Edit report at http://bugs.php.net/bug.php?id=54211&edit=1
ID: 54211
Updated by: aharvey@php.net
Reported by: svecpetr at svecpetr dot com
Summary: delimiter ends with syntax error
-Status: Open
+Status: Bogus
Type: Bug
Package: MySQL related
Operating System: linux
PHP Version: 5.2.17
Block user comment: N
Private report: N
New Comment:
I think Carsten has pretty much nailed this one. Closing.
Previous Comments:
------------------------------------------------------------------------
[2011-03-10 17:21:33] carsten_sttgt at gmx dot de
> in mysql_query is impossible to execute command
> DELIMITER |
"delimiter" is a command for the command line client and not a SQL
statement known by the server.
> ... when delimiter is not function... is impossible to run command
> CREATE TRIGGER because at the end of this command is always ... ; END
...
Just create your trigger (including BEGIN ...; END) as usual, should
work. As always with querys in PHP, no ";" at the end of the query
string.
------------------------------------------------------------------------
[2011-03-10 08:50:52] svecpetr at svecpetr dot com
Description:
------------
in mysql_query is impossible to execute command
DELIMITER |
for example mysql_query('DELIMITER |');
this ends with mysql syntax error 1064
... when delimiter is not function... is impossible to run command
CREATE TRIGGER because at the end of this command is always ... ; END
...
---
From manual page: http://www.php.net/function.mysql-query#Description
---
Test script:
---------------
mysql_query('DELIMITER |');
mysql_query('SHOW TABLES|');
mysql_query('DELIMITER ;');
Expected result:
----------------
enable delimiter
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54211&edit=1
Thread (3 messages)