Why does it matter if someone already viewed the article? If you are going
to remove historical data anyway, after 14 hours, what does it matter if the
person visited 2 hours later or 15 hours later. What about people using
proxy servers, you may be blocking out unique views.
I think I would
This should do the trick
cfquery name=qMyQueryName datasource=#MyDSN# maxrows=5
SELECT articleID, COUNT(ID) AS MyHits
FROM tbl_020articleTopRanked
WHERE DateCreated BETWEEN '#CreateODBCDateTime(Now())#' AND
'#CreateODBCDateTime(DateAdd(h, -14, Now()))#'
GROUP BY articleID
ORDER BY COUNT(ID) DESC
Sorry, it's early, not enough caffeine and I didn't test the code I
forgot to remove the ticks from around the date/time entries in the query...
cfquery name=qMyQueryName datasource=#MyDSN# maxrows=5
SELECT articleID, COUNT(ID) AS MyHits
FROM tbl_020articleTopRanked
WHERE DateCreated BETWEEN
Brian,
The main problem with that however is that i have no way of knowing
when somebody visited the site so I can pick out the top ranked
articles from the previous 12 hours.
Thanks,
Saturday
On 3 Nov 2005, at 14:39, Brian Peddle wrote:
Why does it matter if someone already viewed the
Yep, that worked a treat. I did a little changing to take in to
account for time as my site is hosted in the US and i'm in the UK:
cfquery name=MyQueryName datasource=user020 maxrows=5
SELECT articleID, COUNT(topRankedID) AS MyHits
FROM tbl_020articleTopRanked
WHERE DateViewed BETWEEN
Glad to help
=]
--
Alan Rother
Macromedia Certified Advanced ColdFusion MX 7 Developer
~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a
Why does it matter if someone already viewed
the article?
I actually think that tracking page views and having time limits on counters
is a good approach if you have the time. I run a link database that tracks
clicks on the links. If someone clicks the same link more than once within
six
Then Alans will work.
-Original Message-
From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 03, 2005 10:02 AM
To: CF-Talk
Subject: Re: Finding top ranked articles
Brian,
The main problem with that however is that i have no way of knowing
when somebody
8 matches
Mail list logo