注册 登录
编程论坛 ASP技术论坛

看不出错在哪里,求助!

poseidon989 发布于 2012-04-12 09:49, 441 次点击
问题
只有本站会员才能查看附件,请 登录

二级栏目名称不显示
表结构
只有本站会员才能查看附件,请 登录



主要代码<%
    Sql = "select * from zf11_type where zf11_big_id=0 and  zf11_setting<>4 and zf11_setting<>5 order by zf11_order "
    Set Rs=Conn.Execute(Sql )
    if rs.eof and rs.bof then
    response.write "<option selected value='Add'  selected>===请先添加栏目===</option>"
    else
%>
          <option value="isnull">===请选择栏目===</option>
<%
    do while not rs.eof
%>
          <option value=<%if Rs("zf11_setting")<3  then%>"null"<%end if%><%if Rs("zf11_setting")=3  then%>"<%=trim(RS("Id"))%>|0"<%end if%>><%=trim(rs("zf11_names"))%></option>
          <% if  Rs("zf11_setting")<3  then%>
<%
    SqlClass = "Select  * from zf11_type where  zf11_big_id= "& Rs("ID") &" and zf11_setting<>3 order by zf11_order "
    response.write "SqlClass"
    Set RsClass = Conn.Execute(SqlClass)
    if not RsClass.eof or RsClass.bof then
         
   
%>

     
   
   

          <option value="<%=trim(RS("Id"))%>|<%=trim(RsClass("Id"))%>">├<%=trim(RsClass("zf11_names"))%></option>
         
<%
 do while not RsClass.eof


    RsClass.movenext
    loop
    end if
    RsClass.close
    set RsClass=nothing
%>     
<%end if %>
<%
    rs.movenext
    loop
    end if
    rs.close
    set rs = nothing
    conn.Close
    set conn = nothing
%>
2 回复
#2
aspic2012-04-12 16:37
要循环的部分放错地方了吧。。
#3
aspic2012-04-12 16:39
do while not RsClass.eof
这里放要循环的部分
RsClass.movenext
而你的放在循环之外
1