Print Page | Close Window

Select Top 20 Topics Command

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=20490
Printed Date: 09 April 2026 at 12:29pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Select Top 20 Topics Command
Posted By: lodogg
Subject: Select Top 20 Topics Command
Date 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



-------------
Just trying to have some fun and learn in the process.
http://www.lodogg.com - Come have Some Fun



Replies:
Posted By: lodogg
Date 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.
http://www.lodogg.com - Come have Some Fun


Posted By: aks427
Date 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.


Posted By: lodogg
Date 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.
http://www.lodogg.com - Come have Some Fun



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net