[eluser]North2Alaska[/eluser]
[quote author="bretticus" date="1249722985"]Certainly, that's true. Personally, I'd worry more about AOL proxy servers or some other large ISP proxy than two buddies in a coffee shop. One thing is still true about both scenarios, the session ids should be distinct and the activity timestamps relatively current. I suppose if you are going to look at the last 5 minutes or so, you could remove DISTINCT ip_adress. To me the scenario above probably isn't going to hold much sway for this situation.[/quote]
Right. There are many scenarios where the session table will not give you the number of active users, no matter how you query it. Part of the original question was [quote author="megabyte" date="1249510739"]Whats the best way to track how many people are logged in to your site. ,,,[/quote] This is problematic using only the session table.
Another scenario; I log in using IE and FireFox and Safari all from the same computer. Now there are three session records and only one actual user. I'm running into this problem myself. I'm trying to figure out how (and where in the code) to enforce only one login per user and a user friendly way to notify the other sessions that they are done and log them out.