|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1626 pg_fetch_array($res, $n) works only for $n == 0
Submitted: 1999-06-29 12:21 UTC Modified: 1999-06-29 12:48 UTC
From: colombo at esiway dot net Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 3.0.11 OS: Solaris 2.5.1
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.
Block user comment
Status: Assign to:
Bug Type:
From: colombo at esiway dot net
New email:
PHP Version: OS:


 [1999-06-29 12:21 UTC] colombo at esiway dot net
Used to work with 3.0.7.

$q = "select ...";
$res = pg_exec($db, $q);
for ($n = 0; $res && $n < pg_numrows($res); $n++) {
	$arr = pg_fetch_array($res, $n);
	# some echos displaying $arr[name], $arr[descr]...

first record is displayed ok ($n == 0), the others are empty.
This bug shows with 3.0.10 and 3.0.11, reverting to 3.0.7
solves it. 3.0.1[01] were compliled exactly the same way of 3.0.7 (i just
recompiled it to be sure).
I haven't tested 3.0.[89].


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-29 12:48 UTC] sas at cvs dot php dot net
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 05:03:34 2021 UTC