I have a database that has stored the last time a user visited as a time(); type storage... etc... When the user visits another page i want to run a query against the table and find all users that have been viewing that previous page in the past 5 minutes...
So the forumla is the time(); - last stored time(); and if at or under 5 minutes then display the username. But.. i'm having difficulty figuring out what would constitue 5 minutes in math...
would it just be current time - old time =< 5
??
Oh... and can this be done directly in the sql query to i can just return the whole list of people that have accessed in the last 5 min?