Date: 07/14/00
- Next message: Kristian Koehntopp: "Re: [phplib] quick question on active_sessions"
- Previous message: Ed Lazor: "[phplib] why use textfield?"
- In reply to: Ed Lazor: "[phplib] quick question on active_sessions"
- Next in thread: Maurice Jumelet: "Re: [phplib] quick question on active_sessions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In netuse.lists.phplib you write:
>Am I correct in believing the following sql statement will tell
>me how many users are currently active on the site (when using
>phplib sessions)?
>select * from active_sessions where name='DB_user';
>ps... in this case, DB_user is my extension of the phplib User class.
This statement will tell you, how many DB_user records there are
in your active_sessions table. That number will be most likely
the number of users in your auth_user table. It will not tell
you, how many users are active.
There is no way to tell if a user is active or not. If there
were such a way, we would not need a garbage collection for
session records, but would have a controlled destructor.
You can roughly estimate the number of currently active users
by counting the number of records with name of your session
subclass, which are not older than a cutoff time (e.g. 20
minutes).
Kristian
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Kristian Koehntopp: "Re: [phplib] quick question on active_sessions"
- Previous message: Ed Lazor: "[phplib] why use textfield?"
- In reply to: Ed Lazor: "[phplib] quick question on active_sessions"
- Next in thread: Maurice Jumelet: "Re: [phplib] quick question on active_sessions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

