Answered
Web stats for hit counter
I've got a nice hit counter built with help from these
forums. It's working beautifully. Now I'm building the web stats
page. (no I'm just using CF7 and don't have CFStat from CF8 yet) I
would like to display the total count for the month (which I've
got) and then the daily breakdowns with the count for each day. I
know there's got to be a dynamic way to set the queries up to do
this without building 30 queries or more. I also want it to be able
to continue through the years without me having to modify the
dates.
Right now my simple query looks like this.
<cfquery datasource="#dsn#" name="sept">
select referer, date from website_hits
where page like '%home.cfm'
and date >= '09/01/08'
and date <= '09/30/08'
</cfquery>
and the output is correct with <cfoutput>#sept.recourdcount#</cfoutput>
But I know this is not good coding. I must be overwhelmed or in a brain fog. Any thoughts?
Thanks, Wendy
Right now my simple query looks like this.
<cfquery datasource="#dsn#" name="sept">
select referer, date from website_hits
where page like '%home.cfm'
and date >= '09/01/08'
and date <= '09/30/08'
</cfquery>
and the output is correct with <cfoutput>#sept.recourdcount#</cfoutput>
But I know this is not good coding. I must be overwhelmed or in a brain fog. Any thoughts?
Thanks, Wendy
