Posted by Jerry Stuckle on 03/03/07 19:14
Sanders Kaufman wrote:
> Jerry Stuckle wrote:
>
>> And if you have two people insert at the same time one is going to get
>> the wrong value.
>>
>> A terrible way to do it!
>
> That has changed now, hasn't it?
> My understanding now is that it will return the last value created *on
> that particular connection*.
>
> p.s. I'm still working on that join tutorial you gave me. Thx.
No,
SELECT MAX(id) FROM mytable;
always returns the maximum value, no matter who inserted it.
You're thinking about mysql_last_insert_id(), which is connection specific.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|