ORDER BY RecordDate DESC
In the above, I can get the desired date in descending order result. How would I limit the output to not show dates that are newer than 3 days or older than 30?
ORDER BY RecordDate DESC In the above, I can get the desired date in descending order result. How would I limit the output to not show dates that are newer than 3 days or older than 30? http://towtalk.net ... Hosted by Zarconia.net! |
SELECT * FROM `whatever_table` WHERE `RecordDate` = CURDATE() - INTERVAL 30 DAY ORDER BY `RecordDate` DESC
you could try something like this to get results for last 30 days. I haven't tested but hope it points you in the right direction. caredesign.net |
Here's what I finally came up with. Seems to work. FROM violations It returns all violations older than 3 days but not more than 30 days from today's date. http://towtalk.net ... Hosted by Zarconia.net! |