大家帮忙看看这个程序逻辑哪里不正确呢

两个表:class和smallclass,以classid字段关联。而且现在两个表内已经有关联数据了。

我写下面这个class列表,实现每个父类下面跟子类的功能。
可是,程序却没法运行,页面进度卡死,页面无任何显示:


'前面conn连接数据库代码已经弄好,省略
  <table border="1" width="100%" cellspacing="0" cellpadding="0" class='tableBorder tableBorder-thcenter'>
    <tr><th width="5%"></th>
<th width="10%">类id</th>
<th width="20%">类名称</th>
<th width="20%">类描述</th>
<th width="45%">操作</th>
</tr>
<%
'取得rs记录集----大类名称,id等信息
set rs=server.CreateObject("adodb.recordset")
rs.open "Select * From class",conn,1,3
do while not rs.eof
%>
<tr><td align="center"><img width="16" src="aloesky_IMAGES/folder.png" alt="" /></td>
<td><%=rs("classid")%></td>
<td><%=rs("classname")%></td>
<td><%=rs("dscr")%></td>
<td align="center"></td>
</tr>
<%
'根据classid来关联smallclass小类表,取得相应的小类数据
  set rs1=server.CreateObject("adodb.recordset")
  rs1.open "Select * From smallClass Where classid='" & rs("classid") & "'",conn,1,3
do while not rs1.eof
%>
<tr bgcolor="#E3E3E3><td> - </td>
<td></td>
<td><%=rs1("smallclassname")%></td>
<td><%=rs1("dscr")%></td>
<td align="center"></td>
</tr>
<%
    rs1.movenext
    loop

  call rs1close
rs.movenext
loop

call rscolse
call connclose
%>
  </table>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值