asp下循环一行多少个
(编辑:jimmy 日期: 2024/11/9 浏览:3 次 )
<%
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="/UploadFiles/2021-04-02/<%=rs("> </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="/UploadFiles/2021-04-02/<%=rs("> </td>
<%
if i mod 5 = 0 then
Response.Write("</tr><tr>")
end if
i=i+1
rs.movenext
Loop
rs.close
set rs=nothing
%>
下一篇:asp 合并记录集并删除的sql语句