菜鸟分页出错 请指出错误
<%
sql="SELECT * FROM rzhi ORDER BY ID DESC"
set rs=Server.CreateObject("Adodb.Recordset")
rs.open sql,conn,1,3
if not rs.eof then
pagesUrl="?"
pagesSize=5
if request("page")="" then
thisPage=1
else
thisPage=cint(request("page"))
end if
rs.pagesize=pagesSize
rs.absolutepage=thisPage
allPages=rs.pagecount
allRecords=rs.recordcount
do while not rs.eof
i=i+1
%>
<a href="kan_rzhi.asp?id=<%=rs("id")%>"><%=rs("r_biaoti")%></a>
<%
if i>=pagesSize then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<%
if allPages > 0 then
response.write "当前页<font color='red'>"&thisPage&"</font>/<font color='red'>"&allPages&"</font>, 共<font color='#ff0000'>"&allRecords&"</font>条记录, 每页<font color='red'>"&pagesSize&"</font>条"
if thisPage<=1 then
response.write " 首页 上一页 "
else
response.write " <a href="""&pagesUrl&"page=1"">首页</a> <a href="""&pagesUrl&"page="&(thisPage-1)&""">上一页</a> "
end if
if thisPage>=allPages then
response.write " 下一页 尾页 "
else
response.write " <a href="""&pagesUrl&"page="&(thisPage+1)&""">下一页</a> <a href="""&pagesUrl&"page="&allPages&""">尾页</a> "
end if
response.write "</select>"
end if
%>
</td>
</tr>
</table></td>
<td width="71" height="290"></td>
<td width="187" height="290" align="left" valign="top" class="table11"><table width="197" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="187" height="290" align="left" valign="top" bordercolor="2">
<%
sql="SELECT * FROM ge ORDER BY ID DESC"
set rs=Server.CreateObject("Adodb.Recordset")
rs.open sql,conn,1,3
if not rs.eof then
pagesUrl="?"
pagesSize=5
if request("page")="" then
thisPage=1
else
thisPage=cint(request("page"))
end if
rs.pagesize=pagesSize
rs.absolutepage=thisPage
allPages=rs.pagecount
allRecords=rs.recordcount
do while not rs.eof
i=i+1
%>
<a href="bofang.asp?id=<%=rs("id")%>"><%rs=("name")%></a>
<%
if i>=pagesSize then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
<%
if allPages > 0 then
response.write "当前页<font color='red'>"&thisPage&"</font>/<font color='red'>"&allPages&"</font>, 共<font color='#ff0000'>"&allRecords&"</font>条记录, 每页<font color='red'>"&pagesSize&"</font>条"
if thisPage<=1 then
response.write " 首页 上一页 "
else
response.write " <a href="""&pagesUrl&"page=1"">首页</a> <a href="""&pagesUrl&"page="&(thisPage-1)&""">上一页</a> "
end if
if thisPage>=allPages then
response.write " 下一页 尾页 "
else
response.write " <a href="""&pagesUrl&"page="&(thisPage+1)&""">下一页</a> <a href="""&pagesUrl&"page="&allPages&""">尾页</a> "
end if
response.write "</select>"
end if
%>我是在表格里面分的
...全文
相关推荐
非法操作说明(菜鸟级)
文件系统时出错。
fluent菜鸟必读
但在Windows环境下,可能需要额外配置环境变量,确保系统能够识别Fluent和Gambit的路径,从而避免运行时的错误。
网件无线路由器的菜鸟自检方法
本文主要介绍了针对网件无线路由器的菜鸟自检方法,以帮助用户解决常见故障。首先,遇到无法正常拨号的问题时,用户需要通过浏览器访问路由器的管理地址(如192.168.1.1),输入默认或产品手册中查找的登
菜鸟变高手
**软件安装与卸载**:正确安装和卸载软件是避免系统出错的关键。理解安装程序的工作机制,学会查看软件许可协议,避免安装带有恶意软件的程序。同时,掌握如何彻底卸载软件,防止残留文件影响系统稳定性。4.
易语言菜鸟记事本源码.zip易语言项目例子源码下载
**错误处理**:任何程序都可能遇到异常情况,因此良好的错误处理机制至关重要。查看源码,你将学习到如何使用易语言的错误处理结构,如“尝试”、“如果出错”等语句,以确保程序的稳定运行。6.


