电影社团名字大全:asp 查询结果翻页问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 04:32:58
sql="select * from book where xuhao = '"&request("xuhao")&"' and KM3DATE='"&request("time1")&"'

"
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,1

xuhao=request("xuhao")
time1=request("time1")

-----------------------------------------------------------------

<%if rs3.pagecount<>1 and rs3.pagecount<>0 then%>
<%if page<rs3.pagecount then%>
<%if page=1 then %>
[首页] [上一页]
<%else%>
[<a Href="seach-do1.asp?page=<%=1%>&xuhao=<%=xuhao%>&KM3DATE=<%=time1%>">首页</a>]

[<a Href="seach-do1.asp?page=<% =page-1 %>&xuhao=<%=xuhao%>&KM3DATE=<%=time1%>">上一页</a>]
<% end if %>
[<a Href="seach-do1.asp?page=<%page+1%>&xuhao=<%=xuhao%>&KM3DATE=<%=time1%>">下一页

</a>] [<a Href="seach-do.asp?page=<%=rs3.PageCount%>&xuhao=<%=xuhao%>&KM3DATE=<%=time1%>">尾页

</a>]
<%else%>
[<a Href="seach-do1.asp?page=<% = 1%>&xuhao=<%=xuhao%>&KM3DATE=<%=time1%>">首页

</a>] [<a Href="seach-do1.asp?page=<% =page -1 %>&xuhao=<%=xuhao%>&KM3DATE=<%=time1%>">上一页

</a>]
[下一页] [尾页]
<%end if %>
<%else%>
[首页] [上一页] [下一页] [尾页]
<%end if%>
[页次:<font color=red><b><%=page%></b></font>/<%=rs3.PageCount%>]
[共<font color=red><b><%=rs3.RecordCount%></b></font>篇]
</td>
</tr>
</table> <%end if

------------------------------------------------------------

翻页数据不对,,请指教.
这代码意思就是搜索结果分页后,点下一页时,数据就不对了。
怎么说呢。我想应该初学者都遇到过这样的问题。
下一页传递参数,还有总篇数.等。如果我是按时间段搜索出的结果分页又如何传递参数。??

代码复杂,请贴出出现什么错误提示,具体出错在哪行.