Print Page | Close Window

How to display the latest forum topics?

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=208
Printed Date: 02 April 2026 at 4:30am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How to display the latest forum topics?
Posted By: feed2cats
Subject: How to display the latest forum topics?
Date Posted: 15 February 2003 at 9:32pm

Hi, guys

How to display the latest forum topics on my web page?

Please give me the asp code sample.

Thank you guys




Replies:
Posted By: TYSON
Date Posted: 15 February 2003 at 11:20pm
For which version of the Forum?

-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: michael
Date Posted: 15 February 2003 at 11:24pm

<%'Create your connection to the database here
strSQL="select TOP 5 Subject, Last_Entry_Date from tblTopic GROUP BY Subject, Last_Entry_Date ORDER BY Last_Entry_Date DESC"
Set RS = strConn.Execute(strSQL)
IF RS.BOF OR RS.EOF THEN
Response.Write("There have been no forum posts made yet.")
ELSE
WHILE NOT RS.EOF
Response.Write rs("Subject") & "<br>"
RS.MoveNext
WEND
END IF
'Close your connection cleanup etc.
%>



Posted By: michael
Date Posted: 15 February 2003 at 11:24pm
This example is for the 6.x version. For the 7.x would be similar (don't have the field names in front of me right now.)


Posted By: feed2cats
Date Posted: 16 February 2003 at 3:34am

Hi, michael
Thank you for your reply, well, how can I insert your code into a HTML file? my web site structure is:

http://www.mysite.com - http://www.mysite.com /main.asp

http://www.mysite.com - http://www.mysite.com /forum

So, I want the main.asp shows the the latest 8 posts from every forums, how I can do this?

Thank you so much



Posted By: dolby71
Date Posted: 16 February 2003 at 3:46pm

Just doing this:

<%'Create your connection to the database here
strSQL="select TOP 5 Subject, Last_Entry_Date from tblTopic GROUP BY Subject, Last_Entry_Date ORDER BY Last_Entry_Date DESC"
Set RS = strConn.Execute(strSQL)
IF RS.BOF OR RS.EOF THEN
Response.Write("There have been no forum posts made yet.")
ELSE
WHILE NOT RS.EOF
Response.Write rs("Subject") & "<br>"
RS.MoveNext
WEND
END IF
'Close your connection cleanup etc.
%>

Wherever you wanna show it..



Posted By: serac
Date Posted: 08 July 2003 at 10:44am

Very nice, but anybody know how to create connection to the database and how to close?

'Create your connection to the database here

'Close your connection cleanup etc.



Posted By: MadDog
Date Posted: 08 July 2003 at 1:33pm
feed2cats, look in the mods forum and you will find a mod for displaying the lastest forum posts on your site.

-------------
http://www.iportalx.net" rel="nofollow">



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