1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
asp 从第几条开始读取数据 asp跳过前几条读取数据 <% set rs=server.CreateObject( "adodb.recordset" )
sql= "select top 15 * from jsyllh_xxnews where SMT_key=1 and SMT_newssort=41 order by SMT_id desc "
rs.open sql,conn,1,1 if rs.eof then response.write "本类暂无新闻" else i=0 do while not rs.eof i=i+1 if i >=6 then '从第几条开始读取,就写几
%> <li> <a href= "/nr/xxnews/<%=rs(" SMT_id ")%>.html" target= "_blank" title= "<%=rs(" SMT_title ")%>" ><%=rs( "SMT_title" )%></A></li>
<% end if rs.movenext loop end if rs.close %> |
经本人测试,绝对可以正常使用。
本文转自 gutaotao1989 51CTO博客,原文链接:http://blog.51cto.com/taoyouth/1439642