pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ResultSetMetaData  in PHP?
3+ messages / 2 participants
[nested] [flat]

* ResultSetMetaData  in PHP?
@ 2002-08-28 01:21 Zhidian Du <zdu@cs.nmsu.edu>
  2002-08-29 04:05 ` Re: ResultSetMetaData  in PHP? David Stanaway <david@stanaway.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Zhidian Du @ 2002-08-28 01:21 UTC (permalink / raw)
  To: pgsql-php

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: ResultSetMetaData  in PHP?
  2002-08-28 01:21 ResultSetMetaData  in PHP? Zhidian Du <zdu@cs.nmsu.edu>
@ 2002-08-29 04:05 ` David Stanaway <david@stanaway.net>
  0 siblings, 0 replies; 3+ messages in thread

From: David Stanaway @ 2002-08-29 04:05 UTC (permalink / raw)
  To: Zhidian Du <zdu@cs.nmsu.edu>; +Cc: pgsql-php

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* ResultSetMetaData  in PHP
@ 2002-08-28 02:52 Zhidian Du <zdu@cs.nmsu.edu>
  0 siblings, 0 replies; 3+ messages in thread

From: Zhidian Du @ 2002-08-28 02:52 UTC (permalink / raw)
  To: pgsql-php

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





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-08-29 04:05 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-28 01:21 ResultSetMetaData  in PHP? Zhidian Du <zdu@cs.nmsu.edu>
2002-08-29 04:05 ` David Stanaway <david@stanaway.net>
2002-08-28 02:52 ResultSetMetaData  in PHP Zhidian Du <zdu@cs.nmsu.edu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox