asp 读取记录 从指定第几条读到几条 方法
来源:互联网 发布:天空精品源码 编辑:程序博客网 时间:2024/05/20 10:54
for i = 1 to rs.recordcount
if i>5 then
end if
if i<9 and i>4 then
end if
rs.movenext
if rs.eof then exit for
next
例子:
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
set adoRs=server.CreateObject("adodb.recordset")
sql = "select * from db_channel where ParentID = 12 "
adoRs.open sql,conn,1,3
for i = 1 to adoRs.recordcount
if i>4 and i<9 then
%>
<tr>
<td height="27" class="title" >·<a href="/page/default.asp?pageID=<%=Trim(adoRs("pageID"))%>" class="title" style="color:#ffffff; font-weight:bold" title="<%=adoRs("pagename")%>">
<%
if len(adoRs("pagename")) >15 then
response.Write(left(adoRs("pagename"),14)&"...")
else
response.Write(adoRs("pagename"))
end if
%>
</a></td>
</tr>
<%
end if
adoRs.movenext
if adoRs.eof then exit for
next
adoRs.close
%>
</table>
其中 创建的数据表必须打开
(1)、
sql = "select * from db_channel where ParentID = 12 "
Set adoRs = conn.execute(sql)
(2)、第2种打开了
set adoRs=server.CreateObject("adodb.recordset")
sql = "select * from db_channel where ParentID = 12 "
adoRs.open sql,conn,1,3
- asp 读取记录 从指定第几条读到几条 方法
- 从表的第几条取到第几条记录
- 查询从第几条到第几条记录的高效sql语句
- Note--查询第几条记录
- 帝国从第几条显示
- 几条SQL记录
- 从mysql中随机读取多条记录
- ASP.NET想得到从第10条记录开始的20条记录
- 分享SQL语句从M条数据读取到N条的几种写法!
- ORACLE取中间几条记录的方法
- spring+hibernate删除单条记录的几种方法
- oracle中取中间几条记录的方法
- MSSQL、MYSQL,ACCESSl,Oracle随机读取N条记录方法
- MSSQL、MYSQL,ACCESSl,Oracle随机读取N条记录方法
- 分页显示显示“第几页、共几页、显示几条”
- 查询某条记录在数据库中是 第几行
- dede list列表里显示当前是第几条记录
- asp 指定读取前几条记录
- 基于udp的socket编程小例子之使用多线程进行通信
- 传奇 交易类NPC的各种+1+2什么的说明
- Python-os与shutil对文件和文件夹的操作
- 可拖动排序DIV
- 可拖动DIV+圆角实例
- asp 读取记录 从指定第几条读到几条 方法
- CS0016: 未能写入输出文件“c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b6a1c8
- 突然发现用PHP做多条件模糊查询很简单
- Windows 2003服务器集群安装图解
- PHP转义函数
- 操作系统6-系统调用和库
- Tomcat 下配置一个ip绑定多个域名
- Nginx 和 PHP 的两种部署方式比较
- 使用Js操作注册表