RE: Finding top ranked articles

2005-11-03 Thread Brian Peddle
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

Re: Finding top ranked articles

2005-11-03 Thread Alan Rother
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

Re: Finding top ranked articles

2005-11-03 Thread Alan Rother
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

Re: Finding top ranked articles

2005-11-03 Thread Saturday (Stuart Kidd)
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

Re: Finding top ranked articles

2005-11-03 Thread Saturday (Stuart Kidd)
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

Re: Finding top ranked articles

2005-11-03 Thread Alan Rother
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

RE: Finding top ranked articles

2005-11-03 Thread Justin D. Scott
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

RE: Finding top ranked articles

2005-11-03 Thread Brian Peddle
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