php.net |  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kodmasin at gmail dot com
New email:
PHP Version: OS:

 

 [2006-01-27 00:55 UTC] 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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-29 18:36 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 12:01:27 2024 UTC