[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-db
Subject:    Re: [PHP-DB] Problem with pg_fetch_array
From:       Chris <dmagick () gmail ! com>
Date:       2006-10-24 1:50:37
Message-ID: 453D716D.7070408 () gmail ! com
[Download RAW message or body]

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/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic