ASP超时,我怎么写才能实现这个效果并且不超时
BIGCLASS 大类的表
Download 所有记录
我要实现效果如:http://www.hao123.com/
我要按大类表里的类别记录,读取Download里的记录,每类输出6条
这样写超时,该怎么写
<%
dim bigclass,link
set rs_wzdh=server.createobject( "adodb.recordset ")
sql1= "select * from BigClass_down "
rs_wzdh.open sql1,conn,1,1
do while not rs_wzdh.eof
bigclass=rs_wzdh( "BigClassName ")
%>
<table>
<tr>
<td> <a href= "# "> <%=rs_wzdh( "BigClassName ")%> </td>
<%
set rs_wznr=server.createobject( "adodb.recordset ")
sql2= "select top 6 * from Download where BigClassName= " & bigclass & "order by id desc "
rs_wznr.open sql2,conn,1,1
if not rs_wznr.eof then
do while not rs_wznr.eof
%>
<td> <a href= " <%=rs_wznr( "Softclass ")%> " title= " <%rs_wznr( "System ")%> "> <%rs_wznr( "Title ")%> </a>
<%
Rs_wznr.MoveNext
loop
else
response.Write " <td> 暂无此类别链接 </td> "
end if
Set Rs_wznr = Nothing
%>
<td> <a href= "#?bigclass= <%=rs_wzdh( "BigClassName ")%> "> 更多> > </td>
</tr>
</table>
<%
Rs_wzdh.MoveNext
loop
Set Rs_wzdh = Nothing
%>
------解决方案-------------------- <%
set rs_wznr=server.createobject( "adodb.recordset ")
sql2= "select top 6 * from Download where BigClassName= " & bigclass & "order by id desc "
rs_wznr.open sql2,conn,1,1
if not rs_wznr.eof then
do while not rs_wznr.eof
%>
<td> <a href= " <%=rs_wznr( "Softclass ")%> " title= " <%rs_wznr( "System ")%> "> <%rs_wznr( "Title ")%> </a>
<%
Rs_wznr.MoveNext
loop
else
response.Write " <td> 暂无此类别链接 </td> "
end if
Set Rs_wznr = Nothing 换成 Rs_wznr.Close即可。
%>