php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32699 pg_affected_rows(): Not supported
Submitted: 2005-04-13 22:38 UTC Modified: 2005-04-13 23:47 UTC
From: jeannielu at hotmail dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.3.11 OS: redhat 9
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: jeannielu at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-04-13 22:38 UTC] jeannielu at hotmail dot com
Description:
------------
Warning: pg_affected_rows(): Not supported under this build

Reproduce code:
---------------
$conn = @pg_connect("<...>");
$result = pg_query($conn, "INSERT INTO settings VALUES (0, 1, 'a', 'b')");
$cmdtuples = pg_affected_rows($result);
echo $cmdtuples . " tuples are affected.\n";


Expected result:
----------------
it prints:

1 tuples are affected

Actual result:
--------------
it prints:

Warning: pg_affected_rows(): Not supported under this build in /www/x.php on line 4 0 tuples are affected.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-13 23:01 UTC] tony2001@php.net
So, where is the bug? Your PG version doesn't have tuples support and that is exactly what the error message says.
 [2005-04-13 23:33 UTC] sniper@php.net
The function should not be available at all if it's not supported. 

 [2005-04-13 23:47 UTC] derick@php.net
Fixed in CVS - pg_Affected_rows() will no longer be available if it doesnt work so you can use function_exists() to check for it.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Sep 21 19:01:26 2019 UTC