Posted by jamen on 01/26/06 23:05
opt_inf_env@yahoo.com wrote:
> It can happen that between the first user inserts something
> into database and executes mysql_insert_id, the second user also insert
> something into database. And in this way the mysql_insert_id initiated
> by the first user will return ID of insert-operation initiated by the
> second user. If it is possible, how one can avoid this problem?
>
This is not a problem. The function is related to the connection that
created the last post. So even if there are 1000 users between calls,
you'll get the correct id
Navigation:
[Reply to this message]
|