Home > PHP > Function > FrontBase > fbsql_insert_id()

fbsql_insert_id()

fbsql_insert_id - Get the id generated from the previous INSERT operation

Syntax

int fbsql_insert_id (resource $link_identifier)

Arguments

  • link_identifier - A FrontBase link identifier returned by fbsql_connect() or fbsql_pconnect(). If optional and not specified, the function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if fbsql_connect() was called with no arguments.

Description

Gets the id generated from the previous INSERT operation which created a DEFAULT UNIQUE value.

Version

PHP 4.0.6, 5

Return value

Returns the ID generated from the previous INSERT query, or 0 if the previous query does not generate an DEFAULT UNIQUE value.