分页的效果,出现了BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,

来源:百度知道 编辑:UC知道 时间:2024/05/30 17:29:12
<%
set rs1=server.createobject("adodb.recordset")
sql="select * from jiaoliu "
rs1.open sql,db,1,1
%>
<%
rs1.pagesize=3
pagecount=rs1.pagecount
recordcount=rs1.recordcount
page=int(request("page"))
if page<=0 then page=1
if request("page")="" then page=1
rs1.absolutepage=page
%>
中间没写
<% for i=1 to rs1.pagesize
%>
<p></p>
<table width="490" border="1" align="center" id="table">
<tr>
<td width="70" height="35" align="center">第<%=rs1("id")%> 位 </td>
<td width="165">昵称:<%=rs1("name")%></td>
<td width="233">发表时间:<%=rs1("date")%></td>

你参考一下吧,我看了头晕

<%
id=trim(request("id"))
sql="select * from usertable"
sql=sql&" where username like '%"&s_keyword&"%'"
if id<>"" then
sql=sql&" and id="&id&""
end if
if cataid<>"" then
sql=sql&" and cataid="&cataid&""
end if
sql=sql&" order by id desc"
'sql=sql&" order by usertype desc,isok desc,addtime desc,id desc"

rs.open sql,conn,1,3
rcount=rs.recordcount

if pmcount="" or isempty(pmcount) or pmcount<1 then
pmcount=20
end if
rs.pagesize=pmcount '设置每页数
mpage=rs.pagecount '得到总页数
pageno=request("pageno")
if pageno="" then
pageno=1
end if
if isempty(pageno) or cint(pageno)<1 or cint(pageno)>mpage then
page