php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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].
.TM.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-29 12:48 UTC] sas at cvs dot php dot net
See

http://bugs.php.net/bugs.php3?id=1621
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 12:01:27 2025 UTC