Depends,
There are several methods but they depend on your db schema, the primary key, is there a date(time) field, etc. The easiest way is to run a select query that orders descending on some field which is either a date, datetime, or time datatype, or an auto_incrementing number and is limited to one record. For example, if you have a field called "id" which is set to autoincrement:
SELECT * FROM some_table ORDER BY id DESC LIMIT 0,1
If you need more specific help, you're going to need to provide us with a bit more info. HTH,
Cheers,
Geoff A. Virgo