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 )

Atenção

Esta função é EXPERIMENTAL. Isso quer dizer que o comportamento desta função e seu nome, incluindo TUDO o que está documentado aqui pode mudar em futuras versões do PHP, SEM QUALQUER NOTIFICAÇÃO. Esteja avisado, e use esta função por sua própria conta e risco.

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.