Sweeping Stale Users from DB
| From: | John Starkey | Date: | Wed, 24 Jan 2001 05:08:34 +0000 |
| Subject: | Sweeping Stale Users from DB | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6122@lists.php.net to get a copy of this message | ||
What's the best or recommended way of sweeping users from MySQL on the
hour or half hour or other?
To keep things portable i was thinking about having each login sweep the
db, so every is sweeping for everyone else? But that's kinda dumb. Then i
came up with a cron job, but that will be admin dependent.
What I've done so far is insert a time() into the whoz_logged_on table and
bring it out for comparison on each page refresh in order to logout a user
after 30 mins of inactivity, but I don't like that either.
Is there a common way to do this? As many PHP dbs as there are it's gotta
be a FAQ.
Thanks,
John