asp下循环一行多少个
程序员文章站
2022-04-14 19:11:00
<% set rs = server.createobject("adodb.recor...
<%
set rs = server.createobject("adodb.recordset")
sql = "select * from friend order by id desc"
rs.open sql,conn,1
i=1
do while not rs.eof
%> <td align="left" height="50">
<a href="<%=rs("url")%>" target="_blank">
<img src="<%=rs("logo")%>" class="framed" width="88" height="31" alt="<%=rs("name")%>" /></a>
</td>
<%
if i mod 5 = 0 then
response.write("</tr><tr>")
end if
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
%>
set rs = server.createobject("adodb.recordset")
sql = "select * from friend order by id desc"
rs.open sql,conn,1
i=1
do while not rs.eof
%> <td align="left" height="50">
<a href="<%=rs("url")%>" target="_blank">
<img src="<%=rs("logo")%>" class="framed" width="88" height="31" alt="<%=rs("name")%>" /></a>
</td>
<%
if i mod 5 = 0 then
response.write("</tr><tr>")
end if
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
%>
上一篇: JavaScript教程之基本数据结构
下一篇: asp智能脏话过滤系统v1.0第1/2页
推荐阅读