I'm trying to figure out what is the best or most optimzed way to go about the following situation. All I want to do is retrieve the last row inserted into a table. It happens that one of the fields in my table has a date field, so my plan was to do something like this.
$sql = "SELECT id, name, date FROM the_table ORDER BY date ASC LIMIT 1";
So I think that's pretty self explanatory but I'm sure that's probably not the best way to go about to retrieving the last record.
Anyone have any feedback on this topic for me?