Quote:
Originally Posted by sarettah
select * from table
where created >=DATE_SUB(current_date(), INTERVAL 30 DAY)
order by created desc
That will stack all records created in the past 30 days in descending order so that the newest records are at the top of the pile.
.
|
Much appreciated sir
I assume if I wanted to add a longer date I just change the '30'? Like, INTERVAL 30 DAY isnt a set parameter in php?