How would i get the last 20 results submitted in a mysql db row.
I need the 20 most recent user submitted results.
Cheers.
How would i get the last 20 results submitted in a mysql db row.
I need the 20 most recent user submitted results.
Cheers.
If you don't have timestamp or autoincrement field on that table then you can't.
Otherwise : select * from table order by id desc limit 0,20
If you are using an auto_increment primary key, its as simple as:
SELECT * FROM that_table
ORDER BY auto_increment_primary_key DESC
LIMIT 0, 20
Hi,
See the Query below, there is an function available in mysql syntax below
SELECT FROM ORDER BY DESC LIMIT 0,20