note 9942 added to pg_getlastoid
| From: | damonp at siliconsys dot com | Date: | Sun, 03 Dec 2000 00:07:13 +0000 |
| Subject: | note 9942 added to pg_getlastoid | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8353@lists.php.net to get a copy of this message | ||
function InsertID($table, $col){
$oid = PG_GETLASTOID($result);
$r = @PG_EXEC($this->_db_linkid, "SELECT ".$col." from $table WHERE oid =
$oid");
$row = PG_FETCH_ARRAY($r, 0);
return $row[$col];
}
http://www.php.net/manual/function.pg-getlastoid.php