Home    Back    Forward    Refresh    txtSQL Homepage

last_insert_id
Purpose: To get the last ID generated by the primary key in a table
txtSQL >= 2.2 Final
int last_insert_id ( $table[, $db, [, $column]] )

This function will retrieve the last ID generated by a primary key in a $table. If $column is specified, then txtSQL will return the last ID generated by that column instead of the primary key; if this $column is not auto_increment, then txtSQL will issue an error.


User Comments - last_insert_id
No comments posted yet;
Last Page Next Page

'Language Reference'

User Functions

Database Functions

Data Manipulation Functions

Table Functions
  • showtables
  • createtable
  • droptable
  • altertable
  • describe
  • table_count
  • emptyCache
  • table_exists
  • last_insert_id

    Error Handling Functions

    SQL Syntax

  • [ txtSQL Documentation powered by txtSQL | 5 SQL Queries ]