ASP 中 为什么不能循环 嵌套!
<%setrs=server.CreateObject("adodb.recordset")rs.open"selecthhfromshopxxgroupbyhh",co...
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select hh from shopxx group by hh",conn,1,1
if not rs.eof then
Do while not Rs.Eof
%>
if (<%=rs("hh")%>==e)
{
<%
set r=server.CreateObject("adodb.recordset")
r.open "select ys from shopxx where hh='"+rs("hh")+"'",conn,1,1
for i=0 to R.RecordCount-1
%>
alert( <%=r("ys")%>);
<%
r.Movenext
next
r.close
set r=nothing
%>
}
<%
Rs.Movenext
Loop
end if
rs.close
set rs=nothing
%> 展开
set rs=server.CreateObject("adodb.recordset")
rs.open "select hh from shopxx group by hh",conn,1,1
if not rs.eof then
Do while not Rs.Eof
%>
if (<%=rs("hh")%>==e)
{
<%
set r=server.CreateObject("adodb.recordset")
r.open "select ys from shopxx where hh='"+rs("hh")+"'",conn,1,1
for i=0 to R.RecordCount-1
%>
alert( <%=r("ys")%>);
<%
r.Movenext
next
r.close
set r=nothing
%>
}
<%
Rs.Movenext
Loop
end if
rs.close
set rs=nothing
%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询