PDO::lastInsertId

(no version information, might be only in CVS)

PDO::lastInsertId --  Returns the ID of the last inserted row

Description

int PDO::lastInsertId ( void )

Aviso

Esta función es EXPERIMENTAL. Esto significa que el comportamiento de esta función, el nombre de esta función y en definitiva TODO lo documentado sobre esta función, puede cambiar en una futura version de PHP SIN AVISO. La advertencia queda hecha, y utilizar esta extensión queda bajo su propia responsabilidad.

Nota: Due to differences between database server implementations, this method may not always return a meaningful result.

Valores retornados

Returns an integer representing the row ID of the last row that was inserted into the database. If the PDO driver does not support this capability, PDO::lastInsertID() issues a PDOWarning exception.