#36176 [Opn->Csd]: PDO_PGSQL - PDO::exec() return 1 but no row affected
| From: | iliaa@php.net | Date: | Sun, 29 Jan 2006 17:36:29 +0000 |
| Subject: | #36176 [Opn->Csd]: PDO_PGSQL - PDO::exec() return 1 but no row affected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-92605@lists.php.net to get a copy of this message | ||
ID: 36176
Updated by: iliaa@php.net
Reported By: kodmasin at gmail dot com
-Status: Open
+Status: Closed
Bug Type: PDO related
Operating System: Linux - openSUSE 10.0
PHP Version: 5.1.2
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-01-27 00:55:46] kodmasin at gmail dot com
Description:
------------
PDO::exec under postgresql driver returns 1 even when there are no rows
affected
Reproduce code:
---------------
Tehre are no rows in table with index==20
<?php
$db_connection = new PDO("pgsql:host=localhost port=5432 dbname=test",
"test", "test", array(PDO::ATTR_PERSISTENT => true));
print var_dump($db_connection->exec("DELETE FROM test WHERE
index=20"));
?>
Expected result:
----------------
int(0)
Actual result:
--------------
int(1)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36176&edit=1