PHP 4.0 Bug #7688: loop with in pg_fetch_object

From: Date: Tue, 07 Nov 2000 23:22:14 +0000
Subject: PHP 4.0 Bug #7688: loop with in pg_fetch_object
Groups: php.dev 
Request: Send a blank email to php-dev+get-37392@lists.php.net to get a copy of this message
From: chris.millsaps@wcom.com Operating system: Rehat 7.0 PHP version: 4.0.3pl1 PHP Bug Type: *Function Specific Bug description: loop with in pg_fetch_object cannot break out of a while loop using pg_fetch_object. code is as follows: It produces the same row over and over. function showmessages($parentid) { global $dblink; $Query= "Select id, title, created from message where parent='$parentid'"; if (!(dbresult = pg_exec($dblink, $Query)) { print ("couldn't connect!"); exit(); } while($row = pg_fetch_object($dbResult, $row)) { print ("<LI>($row->created) <A HREF=\""); print ("PHP_SELF?id=$row->id\">"); print ("$row->title</A><br>\n"); showmessages($row->id); } -- Edit Bug report at: http://bugs.php.net/?id=7688&edit=1

« previous php.dev (#37392) next »