Hi Martin,

>> 2 because the (function argument) controlling feature is the
>> connection, it is not possible for another concurrent user to
>> 'steal' your ID or influence the ID returned to you - it's all

> Ok, assume you are correct, but what if you are using persistent 
> connections (ie pconnet)?

don't worry, persistent connection is per-child-process basis,
so concurrent users will use different connection to DB.

the only problem i can think of might occur with pconnect is,
last_insert_id() will return you the last inserted ID from
previous 'session', not current 'session'.
to prevent this, you should call last_insert_id() only when
your INSERT query executed succesfully.


--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Right thinking leads to right living



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to