pg_fetch_array won't work
| From: | Renato Moutinho | Date: | Sat, 24 Jun 2000 05:05:59 +0000 |
| Subject: | pg_fetch_array won't work | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-602@lists.php.net to get a copy of this message | ||
Hello Doug,
Thanks for helping. But I tried that and it didn't
work. Got the same result..
If you or someone else have another clue I would
be very grateful..
All the best,
Renato Moutinho Silva
--- Doug Semig <dougslist@c3net.net> escreveu: >
> Try changing your SQL to "select d1, d2 from test".
>
> Doug
>
> At 04:39 PM 6/22/00 -0700, 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 ?
> >
> >P.S.: PHP 3 with PGSQL6.5 AND PHP4 with PGSQL7.0.2
> >behave the same way..
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/