The lastInsertID method of the PDO class:

The lastInsertID method of the PDO class:



Answer: gets the ID for the last record with an auto-increment ID that has been inserted into a database


Learn More :