数据分行(任意)输出的两种方法

作者:袖梨 2022-06-30

<%
'set rs=server.CreateObject("adodb.recordset") /. Rs在connect.asp在有定义
sql="select * from 试卷信息"
rs.open sql,conn,1,1
%>
++++++++++++++ 方法一 ++++++++++++++++++++++++++++++++++++++++++++++++++++++


<%
j=0
do while not rs.eof
j=j+1 %>

<% if (j mod 2=0) and j>=2 then %>

<% end if
rs.movenext
loop%>

<% =rs("试卷名称")%>

++++++++++++++ 方法二 ++++++++++++++++++++++++++++++++++++++++++++++++++++++

<% do while not rs.eof %>


<%
rs.movenext
k=k+1
if k>5 then exit do
%>

<%
k=k+1
if k>5 then exit do
rs.movenext
loop%>
<% =rs("试卷名称")%> <% =rs("试卷名称")%>


相关文章

精彩推荐