pg_fetch_array and composite fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux