Counting Most Active Users
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=20705
Printed Date: 29 March 2026 at 2:53pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Counting Most Active Users
Posted By: PrivateEye
Subject: Counting Most Active Users
Date Posted: 16 July 2006 at 4:24pm
I want to count Most Active Users ever on my website like on wwf Active uesrs count is on the bottom right corner but I also want max number of active users ever on my website. How?
------------- The Judgement Day
|
Replies:
Posted By: dj air
Date Posted: 16 July 2006 at 4:58pm
i use a database with (site, Count, Max)
i then have it so it only updates when session and cookie (count) = "" then i add one to the count, field
the MAX = max ever online at once
do a check if Count > max then update MAX
and store the max within a a application verible to save queries
|
Posted By: miladanimator
Date Posted: 16 July 2006 at 6:19pm
you should create a column in tblconfiguration with name : online_users
and write asp codes to add online users in this row and then :
if activeusers > online_users then update this column ...
If I have free times , I write this mod ...
|
Posted By: PrivateEye
Date Posted: 16 July 2006 at 7:48pm
I don't want to use database for this purpose as it will increase server load, what I think. Is there any way that I can implement it using Application and Session objects?
------------- The Judgement Day
|
Posted By: dpyers
Date Posted: 16 July 2006 at 8:35pm
Application objects will only last until the next iis restart so the max user data's got to be written somewhere - in either a text file or in a db. Doing I/O on a text file is going to be more expensive than using a DB.
-------------
Lead me not into temptation... I know the short cut, follow me.
|
Posted By: PrivateEye
Date Posted: 16 July 2006 at 8:43pm
OK! can anyonee write scalable code to store data in DB. Thanks in advance.
------------- The Judgement Day
|
Posted By: Demon
Date Posted: 16 July 2006 at 10:39pm
http://www.w3schools.com/sql/sql_insert.asp - Adding a row to a DB
http://www.w3schools.com/sql/sql_update.asp - Updating a row in a DB
http://www.w3schools.com/sql/sql_delete.asp - Deleting a row from a DB
------------- So Sayith the Demon.
|
Posted By: PrivateEye
Date Posted: 24 July 2006 at 9:04pm
and what if I want to use Application and Session objects for the said purpose. How the code will look like?
------------- The Judgement Day
|
|