Author |
Topic  |
|
rnhstn
Starting Member
36 Posts |
Posted - 14 June 2009 : 08:07:21
|
Can someone provide me with a list of all of the various counts that are maintained in the Forum and there respective column name(s) in the DB?
Thanks |
|
Etymon
Advanced Member
    
United States
2391 Posts |
Posted - 14 June 2009 : 14:29:29
|
Not all things that are counted in the forum are stored in the database that I can recall anyway. For instance, topic paging, forum paging, and search paging all require counting to determine the amount of pages to display, but only the amount of items allowed to be displayed per page is stored in the database such as within the variable strPageSize.
A count can be initiated through an array, a loop, or some other looping kind of code, and it can also be initiated through a SELECT statement.
If you do a text search through your files using a text editor like TextPad, then you can find all of the situations where something is counted within a SELECT statement that also uses the word COUNT by looking within the SELECT statements for SELECT COUNT. However, the forum also uses SELECT SUM, and perhaps some other SELECT configurations. You will also find counting in UPDATE statements such as is in topic.asp here: SET T_VIEW_COUNT = (T_VIEW_COUNT + 1).
If you want to see where something is counted through a loop then do a search for the + (addition) or the - (subtraction) symbols and hold on to your seat because those symbols are used for more things than counting whole numbers such as for cursor settings or to display negative numbers.
You're question is not easy to answer with a cut and dry approach, so you will have to sort through what you are looking to obtain and narrow in on those aspects of your purpose. |
Edited by - Etymon on 14 June 2009 14:31:56 |
 |
|
rnhstn
Starting Member
36 Posts |
Posted - 15 June 2009 : 07:29:31
|
Thanks for the explanation Etymon. What I am wanting to count are the number of members that have accessed the Forum per month, as well as how many times each member has accessed the Forum. |
 |
|
Carefree
Advanced Member
    
Philippines
4210 Posts |
Posted - 15 June 2009 : 09:06:27
|
The first count is easy, the second will require an additional field in the members' table.
To get your first count (total per month), you could do something like this:
How do you want to use the visits per member/per month information? Do you want to be able to look it up as Admin, you want to display the top 10, or what? The approach on how to write it will depend on what you need it to do. |
Edited by - Carefree on 15 June 2009 09:11:25 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 15 June 2009 : 13:10:35
|
Are you hosting this yourself or are you using a hosting provider? I ask only because if this is more for reference than display, you may get a better picture by looking into the logfiles. Some hosts provide a service for you, if you're hosting it yourself (or you've got a host that will let you) you can use a number of analysis tools to get a look at what's going on.
As Carefree asked, what you want to do will help us answer you better. |
 |
|
rnhstn
Starting Member
36 Posts |
Posted - 16 June 2009 : 07:41:38
|
You guys are the greatest support for someone like me THANKS.
This is for me to use as the Forum Admin. I have been asked to provide information to our homeowners association about the use of the Forum. So tell me more... and also where do I put the code and execute it?
The Forum is on a hosted web site (Godaddy). So I guess I'll need to contact them and ask them about me being able to search the log files. Are the analysis tools free? |
Edited by - rnhstn on 16 June 2009 10:44:28 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 16 June 2009 : 09:16:10
|
There are a lot of free tools floating around. I found (and am currently using) SmarterStats via http://stackoverflow.com/questions/344693/ and a few other questions over there, you might want to brows those questions for some of the other free tools as your requirements are a little different than mine. 
|
 |
|
Carefree
Advanced Member
    
Philippines
4210 Posts |
Posted - 16 June 2009 : 18:37:35
|
The code I provided was designed as an "include" - to be incorporated within another page. If you want it as a stand-alone file, we'll need to make a couple of changes.
Save the following as "Visitors.asp":
|
 |
|
|
Topic  |
|