I have a query that I need help with ...the current query says:
$query="SELECT * FROM motm where user_id='$for_id'";
$result= mysql_query($query) or die ("Could not execute query : $query." . mysql_error());
I need it to say:
$query="SELECT * FROM motm where user_id='$for_id' AND time<now()-INTERVAL 31"
What I'm trying to accomplish is for the results to only be rows that are older then 31 days. I also know this works if the time is in this format (ex.. 2007-08-29). But what about if the time is unixtimestamp (ex.. 1162022400). I hope this is understandable.
Can anyone please confirm or explain to me what I shoud do?
Thanx
Big D