SQLite3::lastInsertRowID

(PHP 5 >= 5.3.0)

SQLite3::lastInsertRowIDReturns the row ID of the most recent INSERT into the database

Description

public int SQLite3::lastInsertRowID ( void )

Returns the row ID of the most recent INSERT into the database.

Parameters

This function has no parameters.

Return Values

Returns the row ID of the most recent INSERT into the database

Коментарии

lastInsertRowID is relative to the database connection. Hence if there are two instances of a php script (with distinct $db connections) there is no risk that the RowID of the one instance will effect the result of the other instance.

I mention this point here as it was not clear from the documentation, at least not very clear to me and hence I hope it might help others.
2015-01-05 12:08:29
http://php5.kiev.ua/manual/ru/sqlite3.lastinsertrowid.html

    Поддержать сайт на родительском проекте КГБ