如何用一个sql语句统计分类的总数
<%rss.open "select top 12 id,newsname,nid from class where nid="&rs("id")&" order by xu",conn,1,1
if rss.eof then
else
while not rss.eof
rsw.open "select count(id) from news where newsid="&rss("id")&"",conn,1,1
dim tt
tt=rsw(0).value
rsw.close
response.write rss("newsname")&tt&
rss.movenext
if not rss.eof then response.write " | "
wend
end if
rss.close%>
我现在的代码是这样的。
样子就像 http://www.peixuncd.com/cdclass.html 这样的