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 a single column from a row in the result setphp maxdb 函数 returns the lengths of the columns of the current row in the result setphp maxdb 函数 retrieves information about the most recently executed queryphp maxdb 函数 returns the total number of rows changed deleted or inserted by the last executed statementphp oci8 函数 returns the next row from a query as an associative arrayphp oci8 函数 returns the next row from a query as an objectphp oci8 函数 returns the next row from a query as a numeric arrayphp sqlite 函数 returns the number of rows that were changed by the most recent sql statementphp sqlite 函数 opens an sqlite database and returns an sqlitedatabase objectphp sqlite 函数 returns whether or not a previous row is availablephp sqlite 函数 returns the current row indexphp sqlite 函数 returns the rowid of the most recently inserted rowphp sqlite 函数 returns the version of the linked sqlite libraryphp sqlite 函数 seek to the next row numberphp sqlite 函数 returns the number of fields in a result setphp sqlite 函数 returns the number of rows in a buffered result setphp sqlite 函数 executes a query and returns either an array for one single column or the value of the first rowphp sqlite3 returns the number of database rows that were changed or inserted or deleted by the most recent sql statementphp sqlite3 returns english text describing the most recent failed sqlite requestphp sqlite3 returns the row id of the most recent insert into the database
关注编程学问公众号