SYNOPSIS (OPTIONAL)

int db_insert_id( int handle)

DESCRIPTION

After inserting a line into a table with an AUTO_INCREMENT field, this efun can be used to return the (new) value of the AUTO_INCREMENT field.

The function is available only if the driver is compiled with mySQL support. In that case, __MYSQL__ is defined.

The efun triggers a privilege violation (“mysql”, “db_insert_id”).

HISTORY

  • introduced (3.2.9)
  • changed (3.2.11) – adds the privilege violation.