Re: pg_fetch_array won't work

From: Date: Fri, 23 Jun 2000 09:45:19 +0000
Subject: Re: pg_fetch_array won't work
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-587@lists.php.net to get a copy of this message
On Thu, 22 Jun 2000, Renato Moutinho wrote: > Hi folks, > > I've been trying to use the associative array > returned from pg_fetch_array but couldn't find out > how. The scenario: > > TABLE test: > d1 int, > d2 char(50) > > The PHP code goes like this: > > $conn = pg_connect("dbname=mydb"); > $result = pg_Exec($conn,"select * from test"); > $arr = pg_fetch_array($result, 0); > echo $arr["d1"]; > > The result is blank.. nothing printed out. If > I use $arr[0] I get what I wanted.. Anyone has > a clue on this ? Some more information about your system and what do you get back with $arr[0]? I haven't been able to reproduce your problem even after creating table test with the same schema and putting different values in there. > P.S.: PHP 3 with PGSQL6.5 AND PHP4 with PGSQL7.0.2 > behave the same way.. -- Jouni Ahto

« previous php.db (#587) next »