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] wrote:

> 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,
>
> Sunil
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to