主题:为什么提示我的DO WHILE 条件老是提示缺少LOOP
.....
<%
sql="select top 10 * from hw order by hw_buys desc"
rs.open sql,conn,3,3
if rs.eof then
response.write "本站目前没有成交成交任何商品"
else
do while not rs.eof
%>
<a href="views.asp?hw_id=<%=rs("hw_id")%>"><%=rs("hw_name")%></a>
(成交<font color=red><%=rs("hw_buys")%></font>次)<br>
<%
rs.movenext
loop
end if
rs.close
set rs1=nothing
set rs=nothing '这一行说需要加 LOOP
%>
这段代码在单个文件里运行是可以的.但是把它被包括在另一个文件时,老是出现说缺少loop语句...现在有点儿糊涂了.
谢谢!
do while 条件
代码
loop
就是这样简单的代码不知道是哪里错了.
<%
sql="select top 10 * from hw order by hw_buys desc"
rs.open sql,conn,3,3
if rs.eof then
response.write "本站目前没有成交成交任何商品"
else
do while not rs.eof
%>
<a href="views.asp?hw_id=<%=rs("hw_id")%>"><%=rs("hw_name")%></a>
(成交<font color=red><%=rs("hw_buys")%></font>次)<br>
<%
rs.movenext
loop
end if
rs.close
set rs1=nothing
set rs=nothing '这一行说需要加 LOOP
%>
这段代码在单个文件里运行是可以的.但是把它被包括在另一个文件时,老是出现说缺少loop语句...现在有点儿糊涂了.
谢谢!
do while 条件
代码
loop
就是这样简单的代码不知道是哪里错了.