Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 27330475B99 for ; Thu, 29 Aug 2002 00:05:34 -0400 (EDT) Received: from ciderbox.stanaway.net (ciderbox.stanaway.net [170.76.50.98]) by postgresql.org (Postfix) with ESMTP id 42D08475B98 for ; Thu, 29 Aug 2002 00:05:33 -0400 (EDT) Received: by ciderbox.stanaway.net (Postfix, from userid 1000) id 37A8F936E6; Wed, 28 Aug 2002 23:05:22 -0500 (CDT) Subject: Re: ResultSetMetaData in PHP? From: David Stanaway To: Zhidian Du Cc: pgsql-php@postgresql.org In-Reply-To: <3D6C259C.6060008@cs.nmsu.edu> References: <3D6C259C.6060008@cs.nmsu.edu> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.7 Date: 28 Aug 2002 23:05:19 -0500 Message-Id: <1030593919.22999.25.camel@ciderbox> Mime-Version: 1.0 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/101 X-Sequence-Number: 1446 On Tue, 2002-08-27 at 20:21, Zhidian Du wrote: > I am just use PHP. I have two questions: > > 1. When I use OID, how can I get a current OID and lock it and use it > before I insert a record, as nextval(..) does, in PHP? I am not sure that you can get this in advance, but you can get the oid after an insert/update. http://www.php.net/manual/en/function.pg-last-oid.php for PHP 4 >= 4.2.0 otherwise: pg_getlastoid() See: http://www.php.net/manual/en/ref.pgsql.php -- David Stanaway