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 )

Varování

Tato funkce je EXPERIMENTÁLNÍ. Chování této funkce, její název a všechno ostatní, co je zde zdokumentováno, se v budoucích verzích PHP může BEZ OHLÁŠENÍ změnit. Berte to v úvahu a používejte tuto funkci na vlastní nebezpečí.

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

Návratové hodnoty

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.