有句asp代码出错,各位大侠帮帮。谢谢
id=cint(request.QueryString("id"))sql="select*fromxin_Show_Infowherepid=0orderbyordas...
id = cint(request.QueryString("id"))
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
do while not rs.eof
if id<>"" and id<>0 then
sql222 = "select * from xin_Show_Info where id="&id
set rs222=conn.execute(sql222)
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
…………………………………………其他部份省略。
运行后,提示:
'80020009'
\xin_showmenu.asp, line 11
这第11行,就是这句
if id=rs("id") or rs("id")=rs222("pid") then
谢谢各位高手指点一下。如何改? 展开
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
do while not rs.eof
if id<>"" and id<>0 then
sql222 = "select * from xin_Show_Info where id="&id
set rs222=conn.execute(sql222)
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
…………………………………………其他部份省略。
运行后,提示:
'80020009'
\xin_showmenu.asp, line 11
这第11行,就是这句
if id=rs("id") or rs("id")=rs222("pid") then
谢谢各位高手指点一下。如何改? 展开
6个回答
展开全部
<%
id = cint(request.QueryString("id"))
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
do while not rs.eof
if id<>"" and id<>0 then
pid=conn.execute("select pid from xin_Show_Info where id="&id)(0)
if id=rs("id") or ""&rs("id")=""&pid then
style = "style='display:block;'"
else
style = ""
end if
end if
%>
id = cint(request.QueryString("id"))
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
do while not rs.eof
if id<>"" and id<>0 then
pid=conn.execute("select pid from xin_Show_Info where id="&id)(0)
if id=rs("id") or ""&rs("id")=""&pid then
style = "style='display:block;'"
else
style = ""
end if
end if
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
set rs222=conn.execute(sql222)
if not(rs222.eof) Then '先判断一下rs222是否是空集
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
if not(rs222.eof) Then '先判断一下rs222是否是空集
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Set rs=conn.execute(sql)
set rs222=conn.execute(sql222)
我不明白的是 这里你一个大写set一个小写,到底那个是正确的,还是大小写都可以????
set rs222=conn.execute(sql222)
我不明白的是 这里你一个大写set一个小写,到底那个是正确的,还是大小写都可以????
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
id = cint(request.QueryString("id"))
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
do while not rs.eof
if id<>"" and id<>0 then
sql222 = "select * from xin_Show_Info where id="&id
set rs=conn.execute(sql222)
if not rs.eof
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
end if
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
do while not rs.eof
if id<>"" and id<>0 then
sql222 = "select * from xin_Show_Info where id="&id
set rs=conn.execute(sql222)
if not rs.eof
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
end if
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
id = cint(request.QueryString("id"))
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
if rs.eof or rs.bof then
response.write("没有这条数据")
response.end
else
do while not rs.eof
if id<>"" and id<>0 then
sql222 = "select * from xin_Show_Info where id="&id
set rs222=conn.execute(sql222)
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
end if
sql="select * from xin_Show_Info where pid=0 order by ord asc"
showmenu="<ul>"
Set rs=conn.execute(sql)
if rs.eof or rs.bof then
response.write("没有这条数据")
response.end
else
do while not rs.eof
if id<>"" and id<>0 then
sql222 = "select * from xin_Show_Info where id="&id
set rs222=conn.execute(sql222)
if id=rs("id") or rs("id")=rs222("pid") then
style = "style='display:block;'"
else
style = ""
end if
end if
end if
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询