Re: Re: Getting last record ID created from DB
| From: | Richard Lynch | Date: | Tue, 20 Mar 2007 01:39:52 +0000 |
| Subject: | Re: Re: Getting last record ID created from DB | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-250871@lists.php.net to get a copy of this message | ||
On Sat, March 17, 2007 10:16 am, Robert Cummings wrote:
> No, it's a MySQL specific feature that is atomic with the insert and
> so
> you are guaranteed that the the returned ID is the exact automatic ID
> associated with the most recent INSERT for the connection handle.
> Unfortunately auto increment is MySQL specific and so it isn't
> transferrable to other database engines.
Every database package has SOME way to do this.
It's practically criminal that db vendors won't standardize the
mechanics.
SQL-92, SQL-99, SQL-2002 (2004? whatever it was) they STILL can't sit
down and come up with a single mechanism?
One of the most basic fundamental database needs, never standardized.
Probably never will be.
Sigh.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?