I need to access the last inserted record in a postgresql database table
from php. I connect to the db using pg_connect
I construct the query string, and I use pg_query to send the query. I get
the record inserted, of course. One of the fields,
which is my primary key,  is an autoincrement field. I need to fetch this
value. Any idea? I would really apreciate your helping me.

select currval('sequence_name') as 'last_id';

Postgresql & php tutorials

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to