X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5BBFFD9221 for ; Fri, 23 Sep 2005 21:55:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27901-10 for ; Sat, 24 Sep 2005 00:55:41 +0000 (GMT) Received: from a2s4.a2hosting.com (a2s4.a2hosting.com [64.9.205.220]) by svr1.postgresql.org (Postfix) with ESMTP id 63ED3D709A for ; Fri, 23 Sep 2005 21:55:42 -0300 (ADT) Received: from user-1120q9s.dsl.mindspring.com ([66.32.105.60] helo=[192.168.1.10]) by a2s4.a2hosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52) id 1EIyKP-000486-3R; Fri, 23 Sep 2005 20:55:45 -0400 Mime-Version: 1.0 (Apple Message framework v733) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: php-db , pgsql-php@postgresql.org From: John DeSoi Subject: pg_fetch_object Date: Fri, 23 Sep 2005 20:55:44 -0400 X-Mailer: Apple Mail (2.733) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s4.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/17 X-Sequence-Number: 3257 I'm using PHP 5.0.4, PostgreSQL 8.0.2. Docs say (http://www.php.net/manual/en/function.pg-fetch-object.php): 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 constructor. 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? Thanks, John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL