inoltre, dal sito di MySQL si legge che:
The value of mysql_insert_id() is affected only by statements issued within the current client connection. It is not affected by statements issued by other clients.