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 column position representing a row in a result setphp ibm db2 函数 returns an array indexed by column name representing a row in a result setphp ibm db2 函数 returns an array indexed by both column name and position representing a row in a result setphp ibm db2 函数 returns a result set listing the unique row identifier columns for a tablephp maxdb 函数 returns the number of columns for the most recent queryphp maxdb 函数 returns the error code for the most recent statement callphp sqlite 函数 execute a query against a given database and returns an arrayphp sqlite 函数 returns the number of rows that were changed by the most recent sql statementphp sqlite 函数 fetches the next row from a result set as an objectphp 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 rowid of the most recently inserted rowphp sqlite 函数 seek to the previous row number of a result setphp sqlite 函数 executes a query against a given database and returns a result handlephp sqlite 函数 seek to the first row numberphp sqlite 函数 executes a query and returns either an array for one single column or the value of the first rowphp 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 row id of the most recent insert into the database
关注编程学问公众号