Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Select Top 20 Topics Command
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Select Top 20 Topics Command

 Post Reply Post Reply
Author
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Topic: Select Top 20 Topics Command
    Posted: 29 June 2006 at 9:29pm

Please see my piece of code below that I use to pull my top 20 posts.  After the upgrade to 8.03 my top 20 posts are not lining up with the most recent one's listed at the very top?  It is set to list them in a Descending fashion but I'm by no means an ASP programmer but for the most part it does look correct any help would be much appreciated!!

strSQL = "SELECT TOP 20 topic_ID,subject from tblTopic WHERE Forum_ID NOT IN(20) ORDER BY Last_entry_date DESC"

rsLastestPosts.Open strSQL, strCon

Do until rsLastestPosts.eof or rsLastestPosts.bof
strRecentPosts = strRecentPosts + ("<a href=""http://www.lodogg.com/forum/forum_posts.asp?TID=" & rsLastestPosts("topic_ID") & "&PN=1&TPN=1"">" & rsLastestPosts("subject") & "</a><BR>")
rsLastestPosts.movenext
loop

Thanks,
-lo



Edited by lodogg - 29 June 2006 at 9:53pm
Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2006 at 7:19pm

So the script is working where it pulls the newest Top 20 Topics but it does not put the most active topic at the top of the listing?
 

Any help would be much appreciated.

Thanks,

-lo

Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
aks427 View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 06 December 2003
Location: United States
Status: Offline
Points: 276
Post Options Post Options   Thanks (0) Thanks(0)   Quote aks427 Quote  Post ReplyReply Direct Link To This Post Posted: 04 July 2006 at 5:04am
Last_entry_date isn't used in v8... now it uses Last_Thread_ID.  I think if your sorted by that instead it would work.
Back to Top
lodogg View Drop Down
Groupie
Groupie


Joined: 22 August 2003
Location: United States
Status: Offline
Points: 161
Post Options Post Options   Thanks (0) Thanks(0)   Quote lodogg Quote  Post ReplyReply Direct Link To This Post Posted: 07 July 2006 at 9:43pm
Thanks for a quick response that worked great!!
Just trying to have some fun and learn in the process.
Come have Some Fun
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.