How could I take a mysql query like this:
SELECT id,title,timestamp,upvotes,downvotes,views FROM {$table} ORDER BY count DESC LIMIT $start_from, 20
and based on the timestamp (which is a standard mysql timestamp)
make my mysql not only LIMIT $start_from, 20 but in addition…
Limit by:
if it was made today
if it was made between today and a week ago
if it was made between today and a month ago
Any ideas?
MySQL Reference Manual
DATE_SUB