不是吧代码怎么写成这样的
你的tr内的三个td不能用循环来实现吗
你这样写rssort的指针移动3次才有一次判断,如果你的rssort的记录数不是3的整数倍一定会出错的
改成这样的
do while not rssort.eof
i=0
response.write "<tr>"
do while not rssort.eof and i<3
response.write "<td>"
'加上处理td的内容
response.write "</td>"
i=i+1
rssort.movenext
loop
response.write "</tr>"
loopt
<%do while not rssort.eof%>
<TR>
<td width="34%" height="25" align="left"><p style="line-height: 150%"><a href="syjh/default.asp?sortid=<%=rssort("sortid")%>"><%=rssort("sort")%></a><font color="#ff6600"> (<%sql="select count(sortid) from info where flag=1 and sortid="&rssort("sortid")&""
set totle=conn.execute(sql)
totle=totle(0)%><%=totle%>)</font></td>
<%rssort.movenext %>
<td width="34%" height="25" align="left"><p style="line-height: 150%"><a href="syjh/default.asp?sortid=<%=rssort("sortid")%>"><%=rssort("sort")%></a><font color="#ff6600"> (<%sql="select count(sortid) from info where flag=1 and sortid="&rssort("sortid")&""
set totle=conn.execute(sql)
totle=totle(0)%><%=totle%>)</font></td>
<% rssort.movenext %>
<td width="32%" height="25" align="left" ><p style="line-height: 150%"><a href="syjh/default.asp?sortid=<%=rssort("sortid")%>"><%=rssort("sort")%></a><font color="#ff6600"> (<%sql="select count(sortid) from info where flag=1 and sortid="&rssort("sortid")&""
set totle=conn.execute(sql)
totle=totle(0)%><%=totle%>)</font></td>
</TR>
<% rssort.movenext
loop
rssort.close
set rssort=nothing
%>
代码(2)
在程序中插入代码(2)后就会产生上面的问题