pg_fetch_object() and composite field names
| From: | Arcady Genkin | Date: | Thu, 24 May 2001 17:19:59 +0000 |
| Subject: | pg_fetch_object() and composite field names | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54250@lists.php.net to get a copy of this message | ||
Suppose I have a query like this:
$query = "select A.id, B.id from foo A, bar B where A.bleh=B.blob;";
$result = pg_exec( $db, $query);
$obj = pg_fetch_object( $result, 0 );
My question is: How do I access the field names in the $obj now?
I know that I can transform the query to avoid this problem, or use a
function other than pg_fetch_object. But I'm interested whether
pg_fetch_object _can_ be used here.
Many thanks,
--
Arcady Genkin