Menu

Counting sessions

Help
2001-12-02
2002-01-11
  • Alan McFarlane

    Alan McFarlane - 2001-12-02

    I'd like to be able to count the number of registered users, guests online and members logged in...

    Registered users is easy, - SELECT COUNT(*) FROM auuth_user, Guests online are equally easy (although a little inaccurate) - SELECT COUNT(*) FROM active_sessions.

    But what about members logged in? I can't figure out any way to get this.

     
    • Anonymous

      Anonymous - 2002-01-11

      active_sessions.name - havn`t you noticed differrent values depends of "database_classes" for each connections...
      also column sid values shows who`s already connected
      >But what about members logged in? I can't figure out any way to get this
      smth.like
      select count(*) from active_session,auth_user where active_session.sid = auth_user.uid
      all others - are guests.

      AM I RIGHT ? who can tell any others methods?
      correct if so pls.

       

Log in to post a comment.