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 in my creation I created this table and put 4 fields there, topRankedID (PK - incrementing), articleID (ID of the article which has just been viewed), dateViewed (when it was viewed) and lastly ipAddress (client's IP address). Each time the page gets viewed a check is made to see whether this IP has already viewed the page in the last few hours. If they have then an insert doesn't happen but if they haven't then a record is inserted. It all works fine and I'm very happy, but i'm just trying to work out the best way to work out what are the top viewed pages in the last 12 hours. I also will create a script to delete, say, all inserts over 14 hours old so that i'm not using too much MS-SQL space (this i'll do as a CFSCHEDULE or get the hosting company to set up a schedule to run that script. Any advice or help would be greatly appreciated. Thanks, Saturday ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223005 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54