- ·上一篇文章:ASP技术与PHP,CGI,JSP等技术的比较
- ·下一篇文章:教大家如何利用ASP打造网站论坛DIY(1)
教大家如何利用ASP打造网站论坛DIY(2)
前面说过,一片具体的文章是分属在看板和主体之下的。因此显示文章也要经过看板列表和主体列表这两页面后,才能得到特定主题下文章的列表。
(1)板列表的显示页面:
| 以下为引用的内容: < html> < head> < title>看板列表< /title> < meta http-equiv="Content-Type"content="text/html; charset=GB2312"> < /head> |
(2)打开连接,显示看板列表
| 以下为引用的内容: < %Set conn = Server.CreateObject("ADODB.Connection") conn.Open "driver={Microsoft AccessDriver (*.mdb)};dbq=" & Server.MapPath("bbssystem.mdb") sql = "select * from 看板列表" set rs=conn.execute(sql) %> |
注:简单的SQL查询,把所有的看板有关讯息传回到纪录集RS中。下面的任务就是显示纪录记得内容,并在相应的看板名称上建立显示看板主题的连接。
| 以下为引用的内容: < body bgcolor="#FFFFFF"> < h2 align="center">看板列表</h2> < table width="60%" border="0"cellspacing="0" cellpadding="0"align="center"> < tr bgcolor="#FFFFCC"> < td height="35" width="25%">看板名称</td> < td height="35" width="21%">板主</td> < td height="35" width="23%">主题数</td> < td height="35" width="31%">板主登陆</td> < /tr> |
