do while not rs.eof
str="<tr><td>"
str=str & rs("ss")
str=str & "</td><td>"
if not rs.eof then
rs.movenext
str=str & rs("ss")
end if
str=str & "</td></tr>"
if not rs.eof then
rs.movenext
loop
***************************************
<%sql="SELECT * FROM table order by addtime desc"
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,1
do while not rs1.eof
if not rs1.eof then%>
<tr>
<td>显示第一条记录
<%if not rs1.eof then response.write rs1("mingcheng")%></td>
<%rs1.movenext%>
<td>显示第二条记录
<%if not rs1.eof then response.write rs1("mingcheng")%></td>
<%rs1.movenext%>
<td>显示第三条记录
<%if not rs1.eof then response.write rs1("mingcheng")%></td>
<%rs1.movenext%>
’行结束
</tr>
rs1.movenext
i=i+1
loop
%>
为什么这两种方法都是提示LOOP出错??呢???我用的是IIS和WIN1000SERVER。
要如何实现一行显示三条记录啊????我已经问过3次了,还是没有人可以回答上啊。。。。。。。
少了end if
do while not rs.eof
//显示一条记录
rs.movenext
if rs.eof then exit do
//显示一条记录
rs.movenext
if rs.eof then exit do
//显示一条记录
rs.movenext
if rs.eof then exit do
loop
do while not rs.eof
str="<tr><td>"
str=str & rs("ss")
str=str & "</td><td>"
if not rs.eof then
str=str & rs("ss")
end if
str=str & "</td></tr>"
rs.movenext
loop
do while not rs.eof
str="<tr><td>"
str=str & rs("ss")
str=str & "</td><td>"
if not rs.eof then
rs.movenext
str=str & rs("ss")
end if
str=str & "</td></tr>"
if not rs.eof then 這邊錯了﹐如果rs.movenext不寫在一行上
rs.movenext 就要在結尾加上end if
loop