This is probably really easy for most people but it has me stuck!
I've queried a table and got the results but they appear oldest first. How can I make it so that I get the newst first?
Thanks!
Try ordering using DESC
e.g. ORDER BY id DESC
Originally posted by laserlight Try ordering using DESC e.g. ORDER BY id DESC
Sorry to be a newbie, but where do I need to enter that?
Enter it at the end of your query
SELECT id FROM mytable WHERE id > '5' ORDER BY id DESC
gives you id's greater than 5, with the highest id in the table as the first result
Thanks! That works great!