ASP 三级新闻分类
<tdwidth="235"align="center"bgcolor="#103667"><fontcolor="#FFFFFF">栏目名称</font></td><t...
<td width="235" align="center" bgcolor="#103667"><font color="#FFFFFF">栏目名称</font></td>
<td width="162" height="18" align="center" bgcolor="#103667"><font color="#FFFFFF">子栏目</font></td>
<td width="74" height="18" align="center" bgcolor="#103667"><font color="#FFFFFF">操作</font></td>
</tr>
<%
sql = "select * from leibie order by ID asc"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount<>0 then
while not rs.eof
%>
<tr bgcolor="#FFFFFF" height="18">
<td bgcolor="#EFEFEF">
<font color="999999">
<%=rs("leibei")%>
[<font color="#999999">添加二级栏目</font>]</font></td>
<td align="center" bgcolor="#EFEFEF">
个</td>
<td align="center" bgcolor="#EFEFEF">修改 删除</td>
</tr>
<%
sql3 = "select * from leibie1 where leibie='"&rs("ID")&"' order by ID asc"
Set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open sql3,conn,1,1
while not rs3.eof
%>
<tr bgcolor="#FFFFFF" height="18">
<td> ├ <a href="admin_news_list.asp?lm=<%=rs3("id")%>"><font color="<%=rs3("fontcolor")%>"><%=rs3("leibei1")%></font></a><font color="#999999">[<font color="#999999">添加三级栏目</font>]</font></td>
<td align="center">文章: </td>
<td align="center">修改 删除</td>
</tr>
<%
Set rs33 = Server.CreateObject("ADODB.RecordSet")
rs33.Open "select * from leibie2 where leibie1='"&rs3("ID")&"' order by ID asc",conn,1,1
while not rs33.eof
%>
<tr bgcolor="#FFFFFF" height="18">
<td bgcolor="#EFEFEF"> ├ <a href="admin_news_list.asp?lm=<%=rs33("id")%>"><font color="<%=rs33("fontcolor")%>"><%=rs33("leibei2")%></font></a></td>
<td height="18" align="center" bgcolor="#EFEFEF">文章: </td>
<td height="18" align="center" bgcolor="#EFEFEF">修改 删除</td>
</tr>
<%
rs33.movenext
wend
rs3.movenext
wend
rs.movenext
wend
end if
%><%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
帮我看看出了什么问题,我显示分类的时候,出现死循环。等待解决办法。 展开
<td width="162" height="18" align="center" bgcolor="#103667"><font color="#FFFFFF">子栏目</font></td>
<td width="74" height="18" align="center" bgcolor="#103667"><font color="#FFFFFF">操作</font></td>
</tr>
<%
sql = "select * from leibie order by ID asc"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount<>0 then
while not rs.eof
%>
<tr bgcolor="#FFFFFF" height="18">
<td bgcolor="#EFEFEF">
<font color="999999">
<%=rs("leibei")%>
[<font color="#999999">添加二级栏目</font>]</font></td>
<td align="center" bgcolor="#EFEFEF">
个</td>
<td align="center" bgcolor="#EFEFEF">修改 删除</td>
</tr>
<%
sql3 = "select * from leibie1 where leibie='"&rs("ID")&"' order by ID asc"
Set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open sql3,conn,1,1
while not rs3.eof
%>
<tr bgcolor="#FFFFFF" height="18">
<td> ├ <a href="admin_news_list.asp?lm=<%=rs3("id")%>"><font color="<%=rs3("fontcolor")%>"><%=rs3("leibei1")%></font></a><font color="#999999">[<font color="#999999">添加三级栏目</font>]</font></td>
<td align="center">文章: </td>
<td align="center">修改 删除</td>
</tr>
<%
Set rs33 = Server.CreateObject("ADODB.RecordSet")
rs33.Open "select * from leibie2 where leibie1='"&rs3("ID")&"' order by ID asc",conn,1,1
while not rs33.eof
%>
<tr bgcolor="#FFFFFF" height="18">
<td bgcolor="#EFEFEF"> ├ <a href="admin_news_list.asp?lm=<%=rs33("id")%>"><font color="<%=rs33("fontcolor")%>"><%=rs33("leibei2")%></font></a></td>
<td height="18" align="center" bgcolor="#EFEFEF">文章: </td>
<td height="18" align="center" bgcolor="#EFEFEF">修改 删除</td>
</tr>
<%
rs33.movenext
wend
rs3.movenext
wend
rs.movenext
wend
end if
%><%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
帮我看看出了什么问题,我显示分类的时候,出现死循环。等待解决办法。 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询