- February 23, 2010
- Categories:
Because I can never remember it when I need to! How to get the NEXT auto-increment ID back from MySQL. mysql_insert_id() simply returns the id associated with the last insert. This will return the NEXT id.
MySQL > SHOW TABLE STATUS LIKE '{db.tablename}'