⇧
vadnica-logo
My Services About the Project Telegram O meni O meni

mysqli_insert_id()

The mysqli_insert_id() function returns the ID generated by the AUTO_INCREMENT mechanism in the last query.

EXAMPLE
RESULT
The result will be displayed here...

Practical use: When you insert a new record into a table, this function immediately returns the unique number (ID) that the database assigned to this record. Look at the example below: