注释一段ASP代码
<%id2=request("id1")
page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)
set rs=server.createobject("adodb.recordset")
sql="select * from news where cstr(sort)='"+id2+"' order by id desc"
rs.open sql,conn,3,3
if rs.eof then
response.write "暂且没有该类新闻"
response.end
else
rs.pagesize=20
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
i=0
dim id(),title(),filename()
do while not rs.eof and (i<rs.pagesize)
i=i+1
redim preserve id(i),title(i),filename(i)
id(i)=rs("id")
title(i)=rs("title")
filename(i)=rs("filename")
rs.movenext
loop
end if
rs.close
%>