[phplib] postgresql and getlastoid From: Bryan Willett (bryan <email protected>)
Date: 10/01/00

I program Merchant Empires (www.merchantempires.net). The only
way you can use PHPLIB to conquer the universe.

Perhaps someone else has dealt better with getlastoid using
PHPLIB and PostgreSQL. I didn't find support for it so
this is what I added:

function record_oid() {
  $this->Last_OID = 1;
}

var Last_OID = 0;

and then in the db_psql.inc function query I added:

if ( $this->Last_OID ) {
  $this->Last_OID = pg_getLastOid($this->Query_ID);
}

So if you call record_oid before issuing an insert
query, you can then use $query->Last_OID to retrieve
the unique identifier of the newly inserted record.

Could someone put support for getlastoid into db_pgsql.inc?

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>