i have database:
login_id -> ai, int, pk login_token -> varchar(255) login_userid -> varchar(255) login_expires -> varchar(255)
login_expires
unix timestamp.
the login_token
bound cookie. when cookie expires, row database login_token
cookie should deleted too.
what's easiest why this?
with mysql >= 5.1 can use event scheduler:
create event expired on schedule @ current_timestamp + interval 5 minutes delete your_table login_expires < now();
read more in mysql reference manual
Comments
Post a Comment