On 27 Aug 2003 12:15:41 -0700,
ar****@hotmail.com (Carlos Marangon) wrote:
How can I recall the last 5 rows from a MySQL table and show them?
There is no such thing as the 'last 5 rows' in a database.
You need to use a field to order by. If you had a field created_dtm that was
the date and time that the row was inserted, then in MySQL it could be:
SELECT *
FROM yourtable
ORDER BY created_dtm DESC LIMIT 5
--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (
http://www.andyh.co.uk)
Space: disk usage analysis tool (
http://www.andyhsoftware.co.uk/space)