Hi,
Sure there's an easier way.
Use the "datetime" type and then you can use MySQL commands such as:
(Here is my MySQL table first)
CREATE TABLE users (userid int not null auto_increment, name varchar(50), logindate datetime, primary key(userid));
now the select statement...
SELECT * FROM users WHERE now() < DATE_ADD(logindate, INTERVAL 20 MINUTE)
It might read strangely, but what it will do is bring back all users where logindate (a datetime row within my table) is 20 minutes (or greater) than now() (the current system time) - i.e. all people who've logged-in in the past 20 minutes.
or another example:
SELECT * FROM users WHERE SECOND(logindate) = 30 AND MONTH(logindate) = 1
This is a little more abstract! But what it does is list all users who logged in during the month of January at exactly 30 seconds past any minute of any hour!
So you can see - using SQL commands such as SECOND, MINUTE, HOUR, DAYNAME, YEAR, etc is so much easier than selecting loads of debris from the database that you don't really want, only to then have to parse it all and check it manually.
See the SELECT chapter of the MySQL manual for further information (or reply to this!)
Cheers,
Rich