pg_fetch_object: Unable to jump to row....

From: Date: Wed, 01 Nov 2000 04:16:45 +0000
Subject: pg_fetch_object: Unable to jump to row....
Groups: php.general 
Request: Send a blank email to php-general+get-23084@lists.php.net to get a copy of this message
I'm having trouble writing the following code to loop through the database display. Actually it is borrowed almost directly from the php Manual... I did change some of the variables to fit. line nubers 23 $qry = pg_exec ($db_conn , "select * from client"); 24 25 $row = 0; // postgres needs a row counter other dbs might not 26 while ($data = pg_fetch_object ($qry, $row)): 27 echo $data->cl_id." ("; 28 echo $data->cl_name ."): "; 29 echo $data->cl_address."<BR>"; 30 $row++; 31 endwhile; = pg_exec ($db_conn , "select * from client"); 1 (Client 1): Vientiane 2 (Client 2): Vientiane Warning: Unable to jump to row 2 on PostgresSQL result index 2 in /home/httpd/html/Internal/webdesign/DomainClient.php on line 26 Software details PHP: Version 3.0.12 Apache: 1.3.9 (Unix) Help much Appreciated George Patterson -- george@laopdr.com Network Administrator Planet Online Vientiane, Lao PDR

« previous php.general (#23084) next »