Re: insert id
| From: | Luc Saint-Elie | Date: | Thu, 24 Jan 2002 13:33:49 +0000 |
| Subject: | Re: insert id | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-716@lists.php.net to get a copy of this message | ||
At 04:28 24/01/02 -0800, Kancha Nepal wrote:
I'm using pgsql and pear. I've a table with sequence. after i insert a row into the table i'd like to retreive the sequence value that has been used for the insert operation. something like last insert id in mysql. How can i retrieve this value using pear ??Kancha, With mysql it is : If $db is your current connection : $lastAutoIncrement = mysql_insert_id($db->connection); So I suppose you'll have to user pgsql corresponding function. Hope this helps Luc