Postgres arrays
| From: | Robert dot Mallozzi at msfc dot nasa dot gov | Date: | Wed, 31 May 2000 12:47:15 +0000 |
| Subject: | Postgres arrays | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-132@lists.php.net to get a copy of this message | ||
Hello,
I am using PHP4 with a PostgreSQL database. This db allows
the use of array variables in data table fields, and there
seems to be a problem extracting the arrays through PHP.
When I query the table, the array value gets returned as
a string, formatted something like this for a (2, 4)
array:
{{"-58.88","-11.776"},{"0","0"},{"0","0"},{"0","0"}}
Why isn't PHP returning an array instead of a
string? Is there any way to return the values as
an array?
I used the following to execute the query:
$qidx = pg_exec ($database, $query);
Thanks.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Robert S. Mallozzi 256-544-0887
Mail Code SD 50
http://gammaray.msfc.nasa.gov/ Marshall Space
Flight Center
http://cspar.uah.edu/~mallozzir/
Huntsville, AL 35812
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~