Possible Duplicate:
count date difference in hours using php and mysql
I have a MySQL table, in which there’s a column some_column. This column is set as datetime, and when it’s updated it’s updated as NOW().
What I want to do is query the db, that some_column‘s value, and check the time difference between whatever is in there and the time it is when querying. I want to see if more than 2 hours has passed.
How do I do that with PHP ? Or do I do that with MySQL ?
Or, if you’re trying to return rows that were updated over two hours ago: