note 9200 deleted from function.pg-getlastoid by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 21:33:45 +0000 |
| Subject: | note 9200 deleted from function.pg-getlastoid by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22033@lists.php.net to get a copy of this message | ||
The best way is to read nextval('sequence') and use the result in the primary key column
of your insert statement. That way, you get to reserve a unique ID, you know what it is ahead of
time, and you can use referential integrity constraints on your database with your keys. (It seems
DRI doesn't like OID fields)