Re: Problem with pg_fetch_array

From: Date: Tue, 24 Oct 2006 01:50:37 +0000
Subject: Re: Problem with pg_fetch_array
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-42589@lists.php.net to get a copy of this message
Vignesh M P N wrote:
Hi I am trying to display the rows from a database table in a grid. I retrieved the results using pg_query() with a Select command. pg_query() returns true. But when I pass the results $rows to pg_fetch_array(), it returns false. I even tried displaying the error, if any, using:
You return $result to pg_fetch_array not $rows. $query = "SELECT version()"; $result = pg_query($query); while($row = pg_fetch_array($result)) { print_r($row); } A shameless plug but: http://www.designmagick.com/article/10/ -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#42589) next »