Ver Mensaje Individual
  #8 (permalink)  
Antiguo 15/10/2004, 08:49
josemi
Ex Colaborador
 
Fecha de Ingreso: junio-2002
Mensajes: 9.091
Antigüedad: 21 años, 10 meses
Puntos: 16
Hola,

De la pagina de mysql_insert_id() (www.php.net/mysql_insert_id):
Cita:
The last ID that was generated is maintained in the server on a per-connection basis. This means the value the function returns to a given client is the most recent AUTO_INCREMENT value generated by that client. The value cannot be affected by other clients, even if they generate AUTO_INCREMENT values of their own. This behavior ensures that you can retrieve your own ID without concern for the activity of other clients, and without the need for locks or transactions
Es decir, si despues de ejecutar el insert realizas la mysql_insert_id() tienes el ultimo id de esa conexion a la base de datos, sin que registros insertados por otras conexiones puedan afectarle.

Saludos.
__________________
Josemi

Aprendiz de mucho, maestro de poco.