PDO::lastInsertId

(no version information, might be only in CVS)

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

Description

string PDO::lastInsertId ( [string name] )

Figyelem

Ez a függvény KÍSÉRLETI JELLEGGEL MŰKÖDIK. A függvény működése, neve, bármi amit a függévénnyel kapcsolatban dokumentáltunk megváltozhat egy későbbi PHP kiadásban minden figyelmeztetés nélkül. Ezt a függvényt csak a saját felelősségedre használd!

Returns the ID of the last inserted row, or the next value from a sequence object.

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

Paraméterek

name

Name of the sequence object from which the ID should be returned.

Visszatérési értékek

If a sequence name was not specified for the name parameter, PDOStatement::lastInsertId() returns a string representing the row ID of the last row that was inserted into the database.

If a sequence name was specified for the name parameter, PDOStatement::lastInsertId() returns a string representing the next value retrieved from the specified sequence object.

If the PDO driver does not support this capability, PDO::lastInsertID() triggers an IM001 SQLSTATE.