last_insert_id Back | Forward | Home

'Language Reference'

User Functions

Database Functions

Data Manipulation Functions

Table Functions
  • showtables

  • createtable

  • droptable

  • altertable

  • describe

  • table_count

  • empty_cache

  • table_exists

  • last_insert_id


  • Error Handling Functions

    << Last Section ( table_exists ) last_insert_id Next Section ( Error Handling Functions ) >>
    Usage int last_insert_id ( $table[, $db, [, $column]] )
    Purpose To get the last ID generated by the primary key in a table
    Availability txtSQL >= 2.2 Final

    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-Contributed Comments for:
    last_insert_id()
    No comments found;