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

 ID:                 61613
 Updated by:         johan...@php.net
 Reported by:        trebitzki at gmx dot net
 Summary:            No PDO error if first SQL statement of a group is
                     valid.
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            PDO related
 Operating System:   Mac OS X
 PHP Version:        5.3.10
 Block user comment: N
 Private report:     N

 New Comment:

Which PDO driver are you using?


Previous Comments:
------------------------------------------------------------------------
[2012-04-03 22:57:20] trebitzki at gmx dot net

Description:
------------
I am submitting a group of two SQL statements to PDO. The first is valid, the 
second has a syntax error. PDO should throw an exception but doesn't. It only 
throws an exception when the first statement is invalid.

Test script:
---------------
//[symfony 1.4 environment]
$conn = Propel::getConnection();
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo_statement = $conn->prepare('SELECT 1; invalidstatement');
$pdo_statement->execute();


Expected result:
----------------
I expect to have an error thrown since the group of statements has a syntax 
error.

Actual result:
--------------
No error is thrown.


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



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

Reply via email to