|
Add a column called something like "lastactivity", and whenever a user loads a page, update their "lastactivity" value to be the current timestamp. Then, when you want to get the number of logged in users, count all rows where the "lastactivity" value is within (e.g.) 5 minutes of the current system time, i.e. those users who have loaded a page in the last 5 minutes.
Rufo.
|