Date: 03/14/01
- Next message: Michal ROMAN: "[phplib] CHOOSE OF DATABASE"
- Previous message: Rob Taylor: "RE: [phplib] How can I count the number of online users?"
- In reply to: Rob Taylor: "RE: [phplib] How can I count the number of online users?"
- Next in thread: Brian Popp: "RE: [phplib] How can I count the number of online users?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
active_sessions table is one of the tables intalled by phplib. It stores all
the data from individual sessions, one line per session_user.
To query active_sessions you could do something like this
#store these elsewhere !
#this is for mysql
$id_link = <email protected>($hostname, $user_name, $password);
#
$str_sql= "SELECT * FROM active_sessions";
$result = mysql_db_query($dbname, $str_sql, $id_link);
if (! $result) :
echo "SQL: Your query did not bring the expected result";
else:
$num_active_sessions= <email protected>($result);
echo "<h3>There are ";
echo "$num_active_sessions";
echo " people on line now</h3>";
Alain
On Wednesday 14 March 2001 20:40, you wrote:
> > Subject: Re: [phplib] How can I count the number of online users?
> >
> > > as the title.
> > > could anyone reply to me . Thanks
> >
> > do a query on the active_session table and count the number of rows.
>
> Does someone want to spell that out for a newbie.
>
> Where is the active_session table?
>
> Help,
>
> Thanks
>
> RT
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
-- Alain Panisset--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Michal ROMAN: "[phplib] CHOOSE OF DATABASE"
- Previous message: Rob Taylor: "RE: [phplib] How can I count the number of online users?"
- In reply to: Rob Taylor: "RE: [phplib] How can I count the number of online users?"
- Next in thread: Brian Popp: "RE: [phplib] How can I count the number of online users?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

