ResultSetMetaData in PHP?
ResultSetMetaData in PHP?
От:
Zhidian Du <zdu@cs.nmsu.edu>
Дата:
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? 2. How can I use PHP to get the structure of a table, like ResultSetMetaData in JAVA? Thanks. Zhidian Du
Re: ResultSetMetaData in PHP?
От:
David Stanaway <david@stanaway.net>
Дата:
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