SELECT * FROM database WHERE (TO_DAYS(dateadded)-TO_DAYS(Now())>=-30) ORDER BY dateadded DESC, ID DESC