SQLite3::lastInsertRowID

(PHP 5 >= 5.3.0, PHP 7)

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

설명

public int SQLite3::lastInsertRowID ( void )

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

인수

이 함수는 인수가 없습니다.

반환값

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

add a note add a note

User Contributed Notes 1 note

up
24
alexofen at KEINSpamgmail dot com
7 years ago
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.
To Top