sqlite_last_insert_rowid

SQLiteDatabase::lastInsertRowid

(PHP 5 < 5.4.0, PECL sqlite >= 1.0.0)

sqlite_last_insert_rowid -- SQLiteDatabase::lastInsertRowidReturns the rowid of the most recently inserted row

说明

sqlite_last_insert_rowid ( resource $dbhandle ) : int

面向对象风格 (method):

public SQLiteDatabase::lastInsertRowid ( void ) : int

Returns the rowid of the row that was most recently inserted into the database dbhandle, if it was created as an auto-increment field.

Tip

You can create auto-increment fields in SQLite by declaring them as INTEGER PRIMARY KEY in your table schema.

参数

dbhandle

The SQLite Database resource; returned from sqlite_open() when used procedurally. This parameter is not required when using the object-oriented method.

返回值

Returns the row id, as an integer.

相关文章
php ibm db2 函数 returns an array indexed by both column name and position representing a row in a result setphp ibm db2 函数 returns an object with properties representing columns in the fetched rowphp maxdb 函数 returns the error code for the most recent function callphp maxdb 函数 returns the error code for the most recent statement callphp sqlite 函数 returns the number of rows that were changed by the most recent sql statementphp sqlite 函数 fetches a column from the current row of a result setphp sqlite 函数 fetches the current row from a result set as an arrayphp sqlite 函数 returns the name of a particular fieldphp sqlite 函数 returns whether or not a previous row is availablephp sqlite 函数 returns the current row indexphp sqlite 函数 returns the error code of the last error for a databasephp sqlite 函数 returns the rowid of the most recently inserted rowphp sqlite 函数 seek to the first row numberphp sqlite 函数 seek to a particular row number of a buffered result setphp sqlite 函数 executes a query and returns either an array for one single column or the value of the first rowphp sqlite 函数 returns whether more rows are availablephp sqlsrv 函数 returns a row as an arrayphp sqlite3 returns the number of database rows that were changed or inserted or deleted by the most recent sql statementphp sqlite3 returns the numeric result code of the most recent failed sqlite requestphp sqlite3 returns the row id of the most recent insert into the database
关注编程学问公众号