Get the last AUTO_INCREMENT ID in MySQL
2008-05-28 10:14:20
Best way for getting the last AUTO_INCREMENT Id in a MySQL table is to execute the next sentence just after last INSERT. Off course, you can also use it from within your favourite programming language!
SELECT LAST_INSERT_ID() as id;