Selecting last 5 entries

admin

Administrator
Staff member
How would I go about selecting the last 5 entries from a table in mysql?

I know I can use "select * from
LIMIT 5;" to select the first 5, but how would I go about selecting the last 5?

I have tried doing using the 2 parameter option for "LIMIT" (ie, LIMIT [last entry] -5, [last entry]) but I need to select the last 5 entries that match another search spec as well (WHERE example=whatever).

Please help.
 
Back
Top