Skip site navigation (1) Skip section navigation (2)


From: John DeSoi <desoi(at)pgedit(dot)com>
To: php-db <php-db(at)lists(dot)php(dot)net>, pgsql-php(at)postgresql(dot)org
Subject: pg_fetch_object
Date: 2005-09-24 00:55:44
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php
I'm using PHP 5.0.4, PostgreSQL 8.0.2.

Docs say (

object pg_fetch_object ( resource result [, int row [, string  
class_name [, array params]]] )

pg_fetch_object() returns an object with properties that correspond  
to the fetched row's field names. It can optionally instantiate an  
object of a specific class, and pass parameters to that class's  

I'm passing a class name string as the third parameter, but I only  
get back a stdClass object. I also added an array of params as the  
4th parameter to pass to the constructor, but it does not appear to  
be called.

Has anyone successfully used this to create a class other than stdClass?


John DeSoi, Ph.D.
Power Tools for PostgreSQL


pgsql-php by date

Next:From: Michael FuhrDate: 2005-09-24 02:44:20
Subject: Re: pg_fetch_object
Previous:From: Gnanavel SDate: 2005-09-23 06:31:24
Subject: Re: INSERT and UPDATE page examples?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group