pg_fetch_array won't work
| From: | Renato Moutinho | Date: | Thu, 22 Jun 2000 23:39:21 +0000 |
| Subject: | pg_fetch_array won't work | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-585@lists.php.net to get a copy of this message | ||
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..
Thanks in advance,
--
Renato Moutinho Silva = rmsilva_br@yahoo.com
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/