Re: best technique to get the ID of the last inserted value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, July 20, 2007 2:42 pm, Nathan Nobbe wrote:
> im not sure, but i think you still want to surround the insert and the
> db
> specific call to get the
> last insert id within a transaction.

ID generation and uniqueness thereof is SOOO common, that most (all?)
the DBs support it without wrapping things up in a transaction.

In fact, depending on your ACID level, a transaction may or may not
provide a guarantee of getting the right ID back.

Thus, wrapping an insert up in a transaction is generally expensive,
and potentially useless.

So you probably don't want to do that, as a general rule. :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux