Jump to content

[SOLVED] How to - Count Active Sessions


Alexhoward

Recommended Posts

A session is just a container that holds data. Counting sessions, no matter how hard or easy it might be does not tell you much. A visitor could in fact have recently visited your site 13 times and he could have 13 different sessions.

 

Whatever you are doing, you need to do it by using some specific data that tells you exactly what you want to know.

 

If you are looking for the number of members (or a list of members) that are currently logged in, then you need to INSERT/UPDATE the last access time for logged in members in a table and then query the table to get those who's last access time is newer than some limit you pick.

Link to comment
Share on other sites

HI Guys,

 

thanks for the replies.

 

it was a silly question...  i was trying to find the number of items in a users shopping basket.

 

but obviously i can just add together all the quantities...!!

 

I thought this would be a build in function thou...

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.