Bug #64571 [Opn->Nab]: PDO CREATE TRIGGER

From: Date: Sat, 06 Apr 2013 15:43:25 +0000
Subject: Bug #64571 [Opn->Nab]: PDO CREATE TRIGGER
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-178327@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64571&edit=1

 ID:                 64571
 Updated by:         felipe@php.net
 Reported by:        jehoshua02 at gmail dot com
 Summary:            PDO CREATE TRIGGER
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            PDO related
 Operating System:   Ubuntu 12.10 Desktop 64bit
 PHP Version:        5.4.13
 Block user comment: N
 Private report:     N

 New Comment:

DELIMITER is not a mysql statement, but a mysql client command.

Use a separated statement for create trigger part. e.g. $pdo->query("CREATE TRIGGER
...");


Previous Comments:
------------------------------------------------------------------------
[2013-04-03 00:28:44] jehoshua02 at gmail dot com

Could the root of this problem be somehow related to the multiple-query problem?

------------------------------------------------------------------------
[2013-04-03 00:09:02] jehoshua02 at gmail dot com

Description:
------------
I'm using PDO in some simple script to do database migrations and realized that my triggers
weren't being created. I checked to make sure the triggers were correct by first copying and
pasting them into mysql interactive console, then by using SOURCE ..., then by passing
the file name into mysql command, each time verifying the trigger was created by using "SHOW
TRIGGERS WHERE Trigger = :trigger". I concluded that the problem was not with my
trigger statements, or with mysql, but with PDO.

The actual PHP version is 5.4.6-1ubuntu1.2 so I chose the closest one.

Test script:
---------------
https://gist.github.com/jehoshua02/5297332

Expected result:
----------------
I would expect to see the trigger printed as an associative array.

Actual result:
--------------
The trigger is not created even though the script completes without any errors or exceptions.


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64571&edit=1


Thread (4 messages)

« previous php.bugs (#178327) next »