I have a users table with a field "last_action" (DATETIME field) which records the time of the last activity of a user on the site. This allows us to show the users as "online" or not.
Please tell me the mysql query needed to pull all users who's "last_action" field is 5 minutes ago or less. .... something like:
select * from users where last_action <= 10minutesago