In MySQL, how would I get a timestamp from, say 30 days ago?
Something like:
select now() - 30
The result should return a timestamp
You could use:
SELECT unix_timestamp(now()) - unix_timestamp(maketime(_,_,_));
For unix timestamps or:
SELECT addtime(now(),maketime(_,_,_));
For the standard MySQL date format.