pg_fetch_array and composite fields

pg_fetch_array and composite fields

am 10.01.2011 14:23:30 von Rodrigo Dias

Hello all!

I'm trying to print only one value from a composite field:

while ($row = pg_fetch_array($result,NULL,PGSQL_ASSOC)) {
if (isset($row["indef_tam"])) {
echo "Sizes: ".$row["indef_tam"]; // this shows me the three
values from the composite field as a string (e.g. '(100,50,150)' )
echo "Medium size: ".$row["(indef_tam).med"]; // this should show
me the first value, but it doesn't work!
}
}

I can parse the result of the first option through the commas, but
there should be a simpler way. Can anyone help me, please?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php