<% '===============Show Forums and descriptions======================= Dim strSQL Dim conForum Dim rstForums Set conForum = Server.CreateObject("ADODB.Connection") conForum.Open sConnection strSQL = "SELECT Forum_id, ForumName, ForumDescription FROM tblForums;" Set rstForums = conForum.Execute(strSQL) '========================================================== %> forums

<%=sSiteName%> >

<% Dim rstForumInfo, InfoSQL Do Until rstForums.EOF 'get post count and last reply InfoSQL = "SELECT Count(forum_id) as TotalPost, Max(message_timestamp) as LastPost" InfoSQL = InfoSQL & " FROM tblMessages WHERE forum_id=" &rstForums("Forum_id") Set rstForumInfo = conForum.Execute(InfoSQL) %> <% rstForumInfo.Close Set rstForumInfo = NOTHING rstForums.MoveNext %> <% Loop %>
Forum Name and Description Msg # Latest Post
"> <%=rstForums("ForumName")%>
<%=rstForums("ForumDescription")%>
<%=rstForumInfo("TotalPost")%> <%=rstForumInfo("LastPost")%>
<% '===== close all of the connections===== rstForums.Close Set rstForums = Nothing conForum.Close Set conForum = Nothing '================================ %>
Search the forums for a keyword: