note 8188 added to pg_getlastoid

From: Date: Wed, 30 Aug 2000 14:37:09 +0000
Subject: note 8188 added to pg_getlastoid
Groups: php.notes 
Request: Send a blank email to php-notes+get-3669@lists.php.net to get a copy of this message
This is great for tables that use sequences to create a unique record ID ... It turns out all PostgreSQL tables have a hidden column "oid" that holds a unique identifier. This function allows you to find out what OID was assigned to the last record you INSERTed, allowing to fetch the last record you inserted by using it's OID (I'm doing this to find out what value was assigned to a column from a sequence for instance). Of course now that I know this, maybe I could've used the OID's from the bennning, avoiding the seuqences all together ! Ah well, lesson learned :) J.F. http://www.php.net/manual/function.pg-getlastoid.php

« previous php.notes (#3669) next »