SQLite3::lastInsertRowID

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

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

說明

public SQLite3::lastInsertRowID(): int

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

參數(shù)

此函數(shù)沒有參數(shù)。

返回值

Returns the row ID of the most recent INSERT into the database. If no successful INSERTs into rowid tables have ever occurred on this database connection, then SQLite3::lastInsertRowID() returns 0.