now() will give current time and work in all contexts (unix timestamp or
datetime forma)
Try...
delete from table_name where now()-user_login_time > interval 15 minute
in this statment, user_login_time is the time the user logged in.
Regards
Torbjørn
On Thu, 19 Sep 2002 [EMAIL PROTECTED] wrot
Hello all, I am trying to write a delete statement in
which a record is deleted if the time a user logged in
is more than 15 minutes. As a result I would need to
compare login times to the current time. Is there a way
in MySQL to do this? Can the current time be calculated
by SQL?
thanks,
S