Finding top ranked articles

2005-11-03 Thread Saturday (Stuart Kidd)
Hi guys, Late last night in a matter of moments I found myself creating a table called tbl_020articleTopRanked . The idea was to do something similar to news stories where they display their 5 top-viewed articles (like at SMH: http://www.smh.com.au - at the bottom end of the page). So

RE: Finding top ranked articles

2005-11-03 Thread Brian Peddle
: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 8:48 AM To: CF-Talk Subject: Finding top ranked articles Hi guys, Late last night in a matter of moments I found myself creating a table called tbl_020articleTopRanked . The idea was to do something similar

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)
) [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 8:48 AM To: CF-Talk Subject: Finding top ranked articles Hi guys, Late last night in a matter of moments I found myself creating a table called tbl_020articleTopRanked . The idea was to do something similar to news stories where

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