#32699 [Asn->Csd]: pg_affected_rows(): Not supported
| From: | derick@php.net | Date: | Wed, 13 Apr 2005 21:47:49 +0000 |
| Subject: | #32699 [Asn->Csd]: pg_affected_rows(): Not supported | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77489@lists.php.net to get a copy of this message | ||
ID: 32699
Updated by: derick@php.net
Reported By: jeannielu at hotmail dot com
-Status: Assigned
+Status: Closed
Bug Type: PostgreSQL related
Operating System: redhat 9
PHP Version: 4.3.11
Assigned To: tony2001
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-04-13 23:33:20] sniper@php.net
The function should not be available at all if it's not supported.
------------------------------------------------------------------------
[2005-04-13 23:01:21] 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 22:38:55] 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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32699&edit=1