Re: postgres - mysql last_inserted_id
| From: | Richard Lynch | Date: | Fri, 01 Jul 2005 21:13:29 +0000 |
| Subject: | Re: postgres - mysql last_inserted_id | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-218003@lists.php.net to get a copy of this message | ||
On Fri, July 1, 2005 6:24 am, Jason Wong said:
> On Friday 01 July 2005 09:55, Richard Lynch wrote:
>> If there's a reliable, web-safe, connection-dependent way of getting
>> the sequence ID used in an INSERT, it sure ain't documented, and I've
>> never seen it discussed on the PostgreSQL list (which I dropped off
>> awhile ago, so maybe it's something new).
>
> I have already given an example(!)
I caught the example later as I worked my way back through the postings.
You're right.
I'm wrong.
Use currval.
God only knows how I missed it all these years.
It's been there, connection-specific thread-safe, since at least version
7.2...
Maybe it was missing in 6.x days when I started. Maybe I'm just stupid.
Use currval.
--
Like Music?
http://l-i-e.com/artists.htm