Any ideas about this problem?
| From: | jeam at themail dot com | Date: | Sat, 29 Jul 2000 22:00:57 +0000 |
| Subject: | Any ideas about this problem? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8991@lists.php.net to get a copy of this message | ||
Here's a strange problem with PHP's pg_fetch_array function and PostgreSQL:
After a succesful result set from a Postgres connection (using the $result variable), I try this:
$myData = pg_fetch_array($result,0);
echo $myData["LASTNAME"];
// Nothing is printed.
echo $myData[0];
// "Smith" is printed.
echo pg_Result($result,0,"LASTNAME");
// "Smith" is also printed.
Weird. Why is it working with a numeric array index only? This is the expected behavior of
pg_fetch_row, but I am using pg_fetch_array, which according to the PHP manual, should work with
field names as array indexes.
Thanks in advance for any help,
J. Alvarez.
PHP 3.0.12 & PostgreSQL 6.5.3
__________________________________________________________________
Make A Buck Or Two @ TheMail.com - Free Internet Email
Sign-up today at http://www.themail.com/ref.htm?ref=908313