gaza165 Posted June 26, 2009 Share Posted June 26, 2009 I am using a LIMIT to bring back records from a table, instead of bring records back from the start of the table i want to bring back the last records of the table. for example 1 2 3 4 5 6 7 8 9---------THIS ONE 10--------THIS ONE LIMIT 2 Link to comment https://forums.phpfreaks.com/topic/163743-selecting-last-rows-from-database/ Share on other sites More sharing options...
JasonLewis Posted June 26, 2009 Share Posted June 26, 2009 By using ORDER BY, and simply order them by ID in the way you want them. Link to comment https://forums.phpfreaks.com/topic/163743-selecting-last-rows-from-database/#findComment-863995 Share on other sites More sharing options...
dzelenika Posted June 26, 2009 Share Posted June 26, 2009 use ORDER BY id DESC Instead id use time or whatever what meets your last criteria Link to comment https://forums.phpfreaks.com/topic/163743-selecting-last-rows-from-database/#findComment-863996 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.