<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("1.asa")
set rs=server.createobject("adodb.recordset")
sql="select Nclassid , count(*) AS ty1 FROM article group by Nclassid"
sql="SELECT Nclassid , SUM(addpoint) AS ty,count(*) as ty1 FROM article group by Nclassid"
rs.open sql,conn,1,1
if not rs.eof then
i=1
%>
<%
do while not rs.eof
%>
<%=i%> |
<%=rs(0)%> |
<%=rs("ty1")%> |
<%=rs("ty")%> |
<%
rs.movenext
i=i+1
loop
else
%>
暂时没有数据
<%
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
上面这一段代码能计算动网文章系统每个子专题的文章数,不过article表中Nclassid(单位)一栏显示的是数字,怎么对应ANclass表中的Nclass字段(这个字段是与Nclassid相对应的中文名),也就是怎么把子专题的中文名显示出来?