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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
50 - 4 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC