Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - How to display the latest forum topics?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to display the latest forum topics?

 Post Reply Post Reply
Author
feed2cats View Drop Down
Newbie
Newbie


Joined: 15 February 2003
Location: New Zealand
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote feed2cats Quote  Post ReplyReply Direct Link To This Post Topic: How to display the latest forum topics?
    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

Back to Top
TYSON View Drop Down
Groupie
Groupie


Joined: 18 August 2002
Location: Australia
Status: Offline
Points: 142
Post Options Post Options   Thanks (0) Thanks(0)   Quote TYSON Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2003 at 11:20pm
For which version of the Forum?
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
%>

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.)
Back to Top
feed2cats View Drop Down
Newbie
Newbie


Joined: 15 February 2003
Location: New Zealand
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote feed2cats Quote  Post ReplyReply Direct Link To This Post 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/main.asp

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

Back to Top
dolby71 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 27 October 2002
Location: Israel
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote dolby71 Quote  Post ReplyReply Direct Link To This Post 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..

Back to Top
serac View Drop Down
Newbie
Newbie
Avatar

Joined: 08 July 2003
Location: Antarctica
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote serac Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post 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.
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.