OsakaWebbie
Programmer
I have a table with a date field (among other things, of course), and currently I'm pulling in all the records that apply to certain criteria and charting it by date, but the number of dates is getting out of hand. So I want to limit the query to the last 20 dates, and then give the user the option to ask for more historical data if they want.
At face value, the most obvious way is "ORDER BY MyDate DESC LIMIT 20", but if possible I would like to get the results in ascending order, not descending. Is there an easy way to do that? Or do I need to pull all the data into an array (in my PHP code) and step through it backwards?
At face value, the most obvious way is "ORDER BY MyDate DESC LIMIT 20", but if possible I would like to get the results in ascending order, not descending. Is there an easy way to do that? Or do I need to pull all the data into an array (in my PHP code) and step through it backwards?