Forums

This topic is locked

MySQL - Last 25 Records

Posted 23 years ago
1
has voted
23 years ago Stephen Bateman posted:
Can anyone help me retrieve the last 25 records from a MySQL table, I think it may be with a SELECT LIMIT but how do you say the last 25 ?

If it helps I am also using PHP.

GT

Replies

Replied 23 years ago
23 years ago chief monkey replied:
SELECT * FROM table_name LIMIT 25

George

Everybody has got to be somewhere
Replied 23 years ago
23 years ago Bruno Mairlot replied:
This will only give you the FIRST 25 row of the table.

I'd suggest you to use the "ORDER by...DESC" to inverse the result of your query.



--- Better to die trying, than never try at all ---

Reply to this topic