|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36176 PDO_PGSQL - PDO::exec() return 1 but no row affected
Submitted: 2006-01-27 00:55 UTC Modified: 2006-01-29 18:36 UTC
From: kodmasin at gmail dot com Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1.2 OS: Linux - openSUSE 10.0
Private report: No CVE-ID: None
 [2006-01-27 00:55 UTC] kodmasin at gmail dot com
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

$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:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-29 18:36 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 06:01:29 2024 UTC