标题:分页问题
取消只看楼主
iamliubo
Rank: 1
等 级:新手上路
帖 子:357
专家分:0
注 册:2005-11-7
 问题点数:0 回复次数:2 
分页问题
现在这段代码能分页 但是他所分出的页和我数据库里的内容不一样 错在那了 应该怎么改啊 兄弟们!!!
<!--#include file="conn.asp"-->
<%
set ztrs=server.CreateObject("adodb.recordset")
ztrs.open"select * from zhutlq",conn,1,1
page=request("page")
ztrs.pagesize=3
if page="" or page<1 then
page=1
else
page=cint(page)
end if
if page>ztrs.pagecount then
page=ztrs.pagecount
else
page=cint(page)
end if
if not ztrs.eof then
ztrs.absolutepage=page
for i=1 to ztrs.pagesize
if ztrs.eof then exit for
next %>
<tr>
<td width="83" height="30" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="83" height="30" valign="top"><%=ztrs("status")%></td>
</tr>
</table></td>
<td width="560" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="560" height="30" valign="top"><a href='tlq.asp?boardid=<%=ztrs("boardid")%>'><%=ztrs("tlqname")%></a></td>
</tr>
</table></td>
<td width="137" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="137" height="30" valign="top"><%=ztrs("post")%></td>
</tr>
</table></td>
</tr>
<%
ztrs.movenext
end if
ztrs.close
set ztrs=nothing
%>
</table>
搜索更多相关主题的帖子: request include 数据库 file 
2005-12-15 13:24
iamliubo
Rank: 1
等 级:新手上路
帖 子:357
专家分:0
注 册:2005-11-7
得分:0 
有人知道吗,可以指点一下吗,谢谢了

2005-12-15 14:11
iamliubo
Rank: 1
等 级:新手上路
帖 子:357
专家分:0
注 册:2005-11-7
得分:0 
for i=1 to ztrs.pagesize
if ztrs.eof then exit for
next
你说的是这个NEXT吗,如果不是,应该在哪加上??还有别的问题吗???

2005-12-15 16:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-38296-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.223884 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved