[PHP-DB] safe way to retrieve the record i just inserted

2002-11-24 Thread Dave
Hi everyone, I am new to the forum. I am using PHP and PostgreSQL. After I insert into a table Task who's primary key is a serial type (auto sequence number) I would like to immediately retrieve that generated sequence number to use for subsequent inserts into another table Points. So what is a

Re: [PHP-DB] safe way to retrieve the record i just inserted

2002-11-24 Thread Dave Smith
Perhaps pg_last_oid() will help: http://www.php.net/manual/en/function.pg-last-oid.php --Dave Dave wrote: Hi everyone, I am new to the forum. I am using PHP and PostgreSQL. After I insert into a table Task who's primary key is a serial type (auto sequence number) I would like to immediately