www.999bmbm.com:asp代码问题!

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/12 15:41:24
代码如下:<select name="go" onChange='window.location=form.go.options[form.go.selectedIndex].value'>
<option value="">分类显示网址</option>
<option value="wz.asp">全部网址</option>
<%
dim rs2(5)
function listunder(i)
set rs2(i)=server.createobject("adodb.recordset")
rs2(i).open "select classid,classname,verity from XS20_CLASS where topclass="&rs2(i-1)("classid"),conn,1,3
while not rs2(i).eof
dim topclassname
topclassname=""
for x=1 to i
topclassname=topclassname&rs2(x-1)("classname")&">"
next
fujia=""
if rs2(i)("verity")<>1 then fujia="(未审核)"
response.write "<option value='link.asp?classid="&rs2(i)("classid")&"'>"&topclassname&rs2(i)("classname")&fujia&"</option>"&vbCrLf
if i<Ubound(rs2) then
call listunder(i+1)
end if
rs2(i).movenext
wend
end function
set rs2(0)=server.createobject("adodb.recordset")
rs2(0).open "select classid,classname,verity from XS20_CLASS where topclass=0",conn,1,3
while not rs2(0).eof
fujia=""
if rs2(0)("verity")<>1 then fujia="(未审核)"
response.write "<option value='wz.asp?classid="&rs2(0)("classid")&"'>"&rs2(0)("classname")&fujia&"</option>"&vbCrLf
call listunder(1)
rs2(0).movenext
wend
%>
</select>

问题如下:为什么我在选着第一级大类的时候数据库第一级大类信息能全部显示,但我选着包含在第一级中的次级类别,却调不出数据内容!在返回凋第一级信息时,也没有内容了,或者只有几条,为什么?上面的代码有错吗/怎么改?大虾指教!
没人解释?

这个你要注意下表的字段,先要弄懂读的是哪个表里的东西。