[thelist] getting last entry from a table (mysql)

Mark Rees mrees at itsagoodprice.com
Thu Oct 20 04:11:13 CDT 2005

> > ive used   mysql_insert_id() to get the id of an insert just performed, 
> > but this one is to find the one with the largest id, which could have 
> > been added any time in the past.

Try SELECT MAX(id) FROM table

More information about the thelist mailing list