PHP :: Bug #36176 :: PDO_PGSQL
| 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
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
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2006-01-29 18:36 UTC] iliaa@php.net