The hit report page is straightforward. We basically loop thru
the hits table and display each pages results and tally the
grand total for the 3 categories( daily, monthly and total). Since
we dont rotate all totals automatically we must check the hit_date
and todays date to verify if the month and day totals need to be
reported.
Conn.Open(“web_odbc”)
Set RS = Conn.Execute(“SELECT * FROM
hits ORDER BY total_hits DESC”)
total =
0 ‘
Three variables to running totals
T_MONTH = 0
T_TODAY =
0
Do While NOT RS.EOF %>
td_dt =
now()
if datediff(“d”,RS(“last_dt”), td_dt) 0
then ‘check to see if the hits are
todays
todays_hits = 0
‘hits not today so dont
include
else
todays_hits =
RS(“today”) ‘they were today so
include
end if
if datediff(“M”,RS(“last_dt”), td_dt)
0 then ‘ check to see if the hits are
this months
MONTHS_hits =
0
else
MONTHS_hits = RS(“MONTH”)
end if
%>
Loop
RS.Close
Conn.Close
set rs =
nothing
set conn = nothing
%>
| PAGE NAME |
TOTAL HITS |
TODAY’S HITS |
THIS MONTHS HITS |
| <a href="”> | ‘print and add to running totals |
‘write out grand
totals
TOTAL PAGE HITS:
TOTAL HITS
TODAY:
TOTAL THIS
MONTH:
CURRENT ONLINE USERS :
HIGHEST NUMBER
OF SIMULTANEOUS CONNECTIONS:
Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.