ASP:do while loop 循环问题
请大家看看,我的dowhileloop循环嵌套,不知道什么问题,运行时很慢,根本就打不开,是不是循环错了,请高手指教!<%setrs3=server.createobje...
请大家看看,我的do while loop 循环嵌套,不知道什么问题,运行时很慢,根本就打不开,是不是循环错了,请高手指教!
<%
set rs3=server.createobject("adodb.recordset")
sql3="select * from proclass where parentcla=1452"
rs3.open sql3,conn,1,1
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs3.pagesize=4
rs3.AbsolutePage=pagecount
rec=rs3.PageCount
%><%
i=1
do while not rs3.eof
classcode3=rs3("classcode")
%>
<tr>
<td><a href="<%=classnameyy%>.htm"><b><%=rs3("classname")%></b></a></td>
</tr>
<tr>
<td><%
set rs4=server.createobject("adodb.recordset")
sql4="select * from products where ClassID="&classcode3&" by
id desc"
response.Write sql4
rs4.open sql4,conn,1,1
do while not rs4.eof
%>
这是是循环内穷容.....
<%rs4.movenext
loop
rs4.close
%></td>
</tr>
<%
rs3.movenext
loop
rs3.close
%> 展开
<%
set rs3=server.createobject("adodb.recordset")
sql3="select * from proclass where parentcla=1452"
rs3.open sql3,conn,1,1
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs3.pagesize=4
rs3.AbsolutePage=pagecount
rec=rs3.PageCount
%><%
i=1
do while not rs3.eof
classcode3=rs3("classcode")
%>
<tr>
<td><a href="<%=classnameyy%>.htm"><b><%=rs3("classname")%></b></a></td>
</tr>
<tr>
<td><%
set rs4=server.createobject("adodb.recordset")
sql4="select * from products where ClassID="&classcode3&" by
id desc"
response.Write sql4
rs4.open sql4,conn,1,1
do while not rs4.eof
%>
这是是循环内穷容.....
<%rs4.movenext
loop
rs4.close
%></td>
</tr>
<%
rs3.movenext
loop
rs3.close
%> 展开
1个回答
展开全部
<%
set rs3=server.createobject("adodb.recordset")
sql3="select * from proclass where parentcla=1452"
rs3.open sql3,conn,1,1
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs3.pagesize=4
rs3.AbsolutePage=pagecount
rec=rs3.PageCount
%><%
i=1
do while not rs3.eof
classcode3=rs3("classcode")
%>
<tr>
<td><a href="<%=classnameyy%>.htm"><b><%=rs3("classname")%></b></a></td>
</tr>
<%
rs3.movenext
loop
rs3.close
%>
<tr>
<td><%
set rs4=server.createobject("adodb.recordset")
sql4="select * from products where ClassID="&classcode3&" by
id desc"
response.Write sql4
rs4.open sql4,conn,1,1
do while not rs4.eof
%>
这是是循环内穷容.....
<%rs4.movenext
loop
rs4.close
%></td>
</tr>
set rs3=server.createobject("adodb.recordset")
sql3="select * from proclass where parentcla=1452"
rs3.open sql3,conn,1,1
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs3.pagesize=4
rs3.AbsolutePage=pagecount
rec=rs3.PageCount
%><%
i=1
do while not rs3.eof
classcode3=rs3("classcode")
%>
<tr>
<td><a href="<%=classnameyy%>.htm"><b><%=rs3("classname")%></b></a></td>
</tr>
<%
rs3.movenext
loop
rs3.close
%>
<tr>
<td><%
set rs4=server.createobject("adodb.recordset")
sql4="select * from products where ClassID="&classcode3&" by
id desc"
response.Write sql4
rs4.open sql4,conn,1,1
do while not rs4.eof
%>
这是是循环内穷容.....
<%rs4.movenext
loop
rs4.close
%></td>
</tr>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询