Ver Mensaje Individual
  #6 (permalink)  
Antiguo 22/03/2011, 15:07
Avatar de pateketrueke
pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: mysql_insert_id VS LAST_INSERT_ID

volviendo al tema:
Cita:
Note:

Because mysql_insert_id() acts on the last performed query, be sure to call mysql_insert_id() immediately after the query that generates the value.

Note:

The value of the MySQL SQL function LAST_INSERT_ID() always contains the most recently generated AUTO_INCREMENT value, and is not reset between queries.
es bien importante tener en cuenta todas las notas de la documentación, ya que por si mismas resuelven la pregunta inicial de tu tema: definitivamente es mejor mysql_insert_id()
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.