有20条记录,应该有两页,但我点击“Next”时,第二页却不能显示记录!!

lilicsdn 2003-09-15 08:55:23
<!-- #Include File="../inc/dsn.asp" -->
<!-- #Include File="../inc/judge.inc" -->
<%
' bookings_date1=request("syear") + "-" + request("smonth") + "-" + request("sday")

' bookings_date2=request("syear2") + "-" + request("smonth2") + "-" + request("sday2")

'------------------------------------------

qq="select * from bookings where bookings_date>='"&bookings_date1&"' and " &_
"bookings_date<='"&bookings_date2&"' order by confirm_number desc"

rs.Open qq,conn,1,1,1
if not(rs.eof and rs.bof) then
desurl="bookings_list.asp"
pgsz=10
rs.pagesize=Cint(pgsz)
total=rs.pagecount
PageNo=request("pageno")
if pageno="" then pageno=1
scrollAction=request("scrollaction")
if scrollaction="first" then pageno=1
if scrollaction="pre" then pageno=pageno-1
if scrollaction="next" then pageno=pageno+1
if scrollaction="last" then pageno=total
if pageno<1 then pageno=1
if request("inputpage")<>"" then pageno=cint(request("inputpage"))
n=1
rs.absolutepage=pageno
position=rs.pagesize*pageno
pagebegin=position-rs.pagesize+1
if position<rs.recordcount then
pageend=position
else
pageend=rs.recordcount
end if
end if
session("bookings_date1")=bookings_date1
session("bookings_date2")=bookings_date2%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Hotel Bookings</title>
<!-- #Include File="../inc/style.css" -->
<%if not(rs.eof and rs.bof) then %>
<%end if%></head>

<body>


<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="774" height="526">
<tr>
<td width="781" height="18" colspan="2" valign="bottom">
<!-- #Include File="../inc/zhaopin_top.inc" -->
</td>
</tr>
<center>
<tr>
<td width="167" height="397" valign="top">
<!-- #Include File="../inc/zhaopin_left.inc" -->
</td>
</center>
<td width="614" height="397" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="445">
<tr>
<td width="100%" height="25" class="n1">
<p align="right">File Path:Client->Hotel Bookings->Bookings Management</td>
</tr>
<center>
<tr>
<td width="100%" height="27" class="n1">
<p align="center"><font face="Georgia" size="4"> </font></td>
</tr>
<tr>
<td width="100%" height="393" valign="top" align="center">
<% if rs.recordcount=0 then %>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2" height="36" bgcolor="#EAEAD5" bordercolor="#000000">
<tr>
<td width="100%" height="36" align="center"><font face="Georgia" style="font-size: 8pt">
  Sorry,  No results were found!  </font><a title="Return" href="javascript:{history.back(-1)}">Return</a><br>
  </td>
</tr>
</table><br>
<%else%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" id="AutoNumber2" height="36" bgcolor="#EAEAD5" bordercolor="#000000">
<tr>
<td width="100%" height="36" align="center"><font face="Georgia" style="font-size: 8pt">
 </font>If you wish to view guest's details, click the <u>Detail</u> links.<br>
  </td>
</tr>
</table><br>

<%end if%>
<table border=1 borderColor=#DB8933 cellSpacing=0 width="614" class="n1" height="72" style="border-collapse: collapse">
<tr>
<td width="582" align="center" bgcolor="#DB8933" height="40" colspan="10">
<b><font face="Georgia" size="4" color="#EAEAD5">Guest Bookings Detail Records</font></b></td>
</tr>
<tr>
<td width="70" align="center" bgcolor="#EAEAD5" height="25">Confirmation Number</td>
<td width="60" align="center" bgcolor="#EAEAD5" height="25">First Name</td>
<td width="60" align="center" bgcolor="#EAEAD5" height="25">Last Name</td>
<td width="60" align="center" bgcolor="#EAEAD5" height="25">City</td>
<td width="56" align="center" bgcolor="#EAEAD5" height="25">Country</td>
<td width="65" align="center" bgcolor="#EAEAD5" height="25">Check-In Date</td>
<td width="65" align="center" bgcolor="#EAEAD5" height="25">Check-Out Date</td>
<td width="66" align="center" bgcolor="#EAEAD5" height="25">Room Category</td>
<td width="40" align="center" bgcolor="#EAEAD5" height="25">Room Quantity</td>

</tr><%
do while not (rs is nothing)
rowcount=rs.pagesize
do while not rs.eof and rowcount>0
if n=1 then
colortf="FfffFF"
else
colortf="FFFBF7"
end if
n=1-n
%><tr>
<td width="70" align="center" height="8" bgcolor="#EDEDED"><%=rs("confirm_number")%></td>
<td width="60" align="center" height="8" bgcolor="#EDEDED"><%=rs("first_name")%></td>
<td width="60" align="center" height="8" bgcolor="#EDEDED"><%=rs("last_name")%></td>
<td width="60" align="center" height="8" bgcolor="#EDEDED"><%=rs("city")%></td>
<td width="56" align="center" height="8" bgcolor="#EDEDED"><%=rs("country")%></td>
<td width="65" align="center" height="8" bgcolor="#EDEDED"><%=rs("check_in_date")%></td>
<td width="66" align="center" height="8" bgcolor="#EDEDED"><%=rs("check_out_date")%></td>
<td width="66" align="center" height="8" bgcolor="#EDEDED"><%=rs("room_category")%></td>
<td width="40" align="center" height="8" bgcolor="#EDEDED"><%=rs("room_quantity")%></td>

</center>

</tr><%
rowcount=rowcount-1
rs.movenext
loop
set rs =rs.nextrecordset
loop
conn.close
set rs=nothing
set conn=nothing
%>
<form name="search" action="<%=desurl%>?sortby=<%=request("sortby")%>" method="post">
<tr>
<td align="middle" class="n2" height="20" colspan="10" bgcolor="#EAEAD5" width="561"><font color="#808080"><%if pageno>1 then%>
<a href="<%=desurl%>?scrollaction=first&pageno=<% =pageno%>"><font color="000099">First</font></a>
<%response.write " "%>
<a href="<%=desurl%>?scrollaction=pre&pageno=<% =pageno%>"><font color="000099">Previous</font></a>
<%else
response.write "<font color='darkgray'>First</font>"
response.write " "
response.write "<font color='darkgray'>Previous</font>"
end if
response.write " "
if rowcount=0 and pageno<>total then%>
<a href="<%=desurl%>?scrollaction=next&pageno=<% =pageno%>"><font color="000099">Next</font></a>
<%response.write " "%>
<a href="<%=desurl%>?scrollaction=last&pageno=<% =pageno%>"><font color="000099">Last</font></a>
<%else
response.write "<font color='darkgray'>Next</font>"
response.write " "
response.write "<font color='darkgray'>Last</font>"
end if
%></font>      <%=pageno%>/<%=total%>Page         
Goto page:<input type="text" name="inputpage" size="6" style="height: 20; width: 28" value="1" maxlen="3">Page <input class="sub" onclick="validate()"
style="font-family: Impact" type="button" value=" GO " id=button1 name=button></td>
</tr></form>
</table>
<%
set rs=nothing
set rs2=nothing
%>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="781" height="37" valign="middle" colspan="2"><p align="center"><!-- #Include File="../inc/bottom.inc" --></td>
</tr>
</table></div></body></html>
有20条记录,应该有两页,但我点击“Next”时,第二页却不能显示记录!!
...全文
87 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
lilicsdn 2003-09-15
  • 打赏
  • 举报
回复
if request("qq")<>"" then
bookings_date1=request("bookings_date1")
bookings_date2=request("bookings_date2")
'qq=request("qq")
else
bookings_date1=request("syear") + "-" + request("smonth") + "-" + request("sday")


bookings_date2=request("syear2") + "-" + request("smonth2") + "-" + request("sday2")
end if

qq="select * from bookings where bookings_date>='"&bookings_date1&"' and " &_
"bookings_date<='"&bookings_date2&"' order by confirm_number desc"


问题解决了,谢谢。。。。61(儿童节快乐)
lilicsdn 2003-09-15
  • 打赏
  • 举报
回复
if request("qq")<>"" then
bookings_date1=request("bookings_date1")
bookings_date2=request("bookings_date2")
qq=request("qq")
else
bookings_date1=request("syear") + "-" + request("smonth") + "-" + request("sday")
bookings_date2=request("syear2") + "-" + request("smonth2") + "-" + request("sday2")

qq="select * from bookings where bookings_date>='"&bookings_date1&"' and " &_
"bookings_date<='"&bookings_date2&"' order by confirm_number desc"
end if

.....
<a href="<%=desurl%>?scrollaction=next&pageno=<% =pageno%>&qq=<%=qq%>&bookings_date1=<%=bookings_date1%>&bookings_date2=<%=bookings_date2%>"><font color="000099">Next</font></a>

呵,第二页还是空表,:(
55555。。。。
61 2003-09-15
  • 打赏
  • 举报
回复
if request("qq")<>"" then
qq=request("qq")
else
qq="select * from bookings where bookings_date>='"&bookings_date1&"' and " &_
"bookings_date<='"&bookings_date2&"' order by confirm_number desc"
end if

......

<a href="<%=desurl%>?scrollaction=next&pageno=<% =pageno%>&qq=<%=qq%>"><font color="000099">Next</font></a>
yzwxjun 2003-09-15
  • 打赏
  • 举报
回复
试试楼上的再说吧,
lilicsdn 2003-09-15
  • 打赏
  • 举报
回复
bookings_date1=request("syear") + "-" + request("smonth") + "-" + request("sday")

bookings_date2=request("syear2") + "-" + request("smonth2") + "-" + request("sday2")
去掉引号。

呵呵,第二页只显示一个空表。
lilicsdn 2003-09-15
  • 打赏
  • 举报
回复
贴的长了一点,table里的东东可跳过,不看, 请指教!
课程简介: 课程总计41课,从什么是事务讲起,直到分布式事务解决方案,很的0基础基础与提升系列课程。对于难以理解的知识点,全部用画图+实战的方式讲解。 第一部分:彻底明白事务的四个特性:原子性、一致性、隔离性、持久性,用场景和事例来讲解。 第二部分:实战讲数据库事务的6中并发异常:回滚丢失、覆盖丢失、脏读、幻读、不可重复读、MVCC精讲。 第三部分:彻底搞清楚4种事务隔离级别:READ_UNCOMMITTED 读未提交隔离级别、READ_COMMITTED 读已提交隔离级别、REPEATABLE_READ 可重复度隔离级别、SERIALIZABLE 序列化隔离级别 第四部分:彻底搞清楚MySQL的各种锁:行锁、表锁、共享锁、排它锁、Next-Key锁、间隙锁、X锁、S锁、IS锁、IX锁、死锁、索引与锁、意向锁等。 第五部分:彻底搞清楚Spring事务的7种传播级别的原理和使用:PROPAGATION_REQUIRED、PROPAGATION_SUPPORTS、PROPAGATION_MANDATORY、PROPAGATION_REQUIRES_NEW、PROPAGATION_NOT_SUPPORTED、PROPAGATION_NEVER、PROPAGATION_NESTED分布式事务的理论基础:RPC定理、BASE理论、XA协议都是什么,原理是什么,有什么关联关系 第六部分:分布式事务的5种解决方案原理和优缺点:2PC两阶段提交法、3PC三阶段提交法、TCC事务补偿、异步确保策略、最大努力通知策略 第七部分:阿里巴巴分布式事务框架Seata:历经多年双十一,微服务分布式事务框架,用一个Nacos+Spring Cloud+Seta+MySql的微服务项目,实战讲解阿里的分布式事务技术,深入理解和学习Seata的AT模式、TCC模式、SAGA模式。 课程资料: 课程附带配套2个项目源码72页高清PDF课件一份阿里巴巴seata-1.1.0源码一份阿里巴巴seata-server安装包一份
cms-Cloud后台管理系统 cms-Cloud 基于Spring Boot、Spring Cloud & Alibaba、OAuth2的前后端分离的后台管理系统,内置模块如:部门管理、角色用户、菜单及按钮授权、数据权限、系统参数、日志管理、代码生成等。在线定任务配置;支持集群,支持多数据源。核心技术前端技术栈 ES6、vue、vuex、vue-router、vue-cli、axios、element-ui后端技术栈 Spring Boot、Spring Cloud & Alibaba、OAuth2系统需求JDK >= 1.8MySQL >= 5.5Maven >= 3.0主要特性1. 完全响应式布局(支持电脑、平板、手机等所有主流设备)2. 强大的一键生成功能(包括控制器、模型、视图、菜单等)3. 支持多数据源,简单配置即可实现切换。4. 支持按钮及数据权限,可自定义部门数据权限。5. 对常用js插件进行二次封装,使js代码变得简洁,更加易维护6. 完善的XSS防范及脚本过滤,彻底杜绝XSS攻击7. Maven多项目依赖,模块及插件分项目,尽量松耦合,方便模块升级、增减模块。8. 国际化支持,服务端及客户端支持9. 完善的日志记录体系简单注解即可实现技术选型1、系统环境Java EE 8Servlet 3.0Apache Maven 32、主框架Spring Boot 2.2Spring Cloud Hoxton.SR3Spring Framework 5.1Spring Security 5.13、持久层Apache MyBatis 3.4Alibaba Druid 1.14、视图层Vue 2.6Axios 0.18Element UI 2.11内置功能(1) 用户管理:用户是系统操作者,该功能主要完成系统用户配置。(2) 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。(3) 岗位管理:配置系统用户所属担任职务。(4) 菜单管理:配置系统菜单,操作权限,按钮权限标识等。(5) 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。(6) 字典管理:对系统中经常使用的一些较为固定的数据进行维护。(7) 参数管理:对系统动态配置常用参数。(8) 通知公告:系统通知公告信息发布维护。(9) 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。(10) 登录日志:系统登录日志记录查询包含登录异常。(11) 在线用户:当前系统中活跃用户状态监控。(12) 定任务:在线(添加、修改、删除)任务调度包含执行结果日志。(13) 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。(14) 系统接口:根据业务代码自动生成相关的api接口文档。(15) 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。(16) 在线构建器:拖动表单元素生成相应的HTML代码。(17) 连接池监视:监视当期系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。 环境部署准备工作JDK >= 1.8 (推荐1.8版本)Mysql >= 5.5.0 (推荐5.7版本)Redis >= 3.0Maven >= 3.0Node >= 10nacos >= 1.1.0sentinel >= 1.6.0运行系统因为本项目是前后端分离的,所以需要前后端都启动好,才能进行访问。后端运行1、导入cms到Eclipse,菜单 File -> Import,然后选择 Maven -> Existing Maven Projects,点击 Next> 按钮,选择工作目录,然后点击 Finish 按钮,即可成功导入Eclipse会自动加载Maven依赖包,初次加载会比较慢(根据自身网络情况而定)2、创建数据库cms-cloud并导入数据脚本cms.sql(必须),quartz.sql(可选)3、创建数据库cms-config并导入数据脚本cms_config.sql(必须)4、配置nacos持久化,修改conf/application.properties文件,增加支持mysql数据源配置。# db mysqlspring.datasource.platform=mysqldb.num=1db.url.0=jdbc:mysql://localhost:3306/cms-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTCdb.user=rootdb.password=password5、打开运行基础模块(启动没有先后顺序)CmsGatewayApplication (网关模块 必须)CmsAuthApplication (认证模块 必须)CmsSystemApplication (系统模块 必须)CmsMonitorApplication (监控中心 可选)CmsGenApplication (代码生成 可选)CmsJobApplication (定任务 可选)CmsFileApplication (文件服务 可选)前端运行# 进入项目目录cd cms-ui# 安装依赖npm install# 强烈建议不要用直接使用 cnpm 安装,会有各种诡异的 bug,可以通过重新指定 registry 来解决 npm 安装速度慢的问题。npm install --registry=https://registry.npm.taobao.org 本地开发 启动项目npm run dev打开浏览器,输入:http://localhost:80 (默认账户 admin/admin123)若能正确展示登录页面,并能成功登录,菜单及页面展示正常,则表明环境搭建成功提示前端安装完node后,最好设置下淘宝的镜像源,不建议使用cnpm(可能会出现奇怪的问题)部署系统因为本项目是前后端分离的,所以需要前后端都部署好,才能进行访问后端部署bin/package.bat 在项目的目录下执行然后会在项目下生成 target文件夹包含 war 或jar1、jar部署方式使用命令行执行:java –jar xxxx.jar 或者执行脚本:bin/run.bat2、war部署方式pom.xml packaging修改为war 放入tomcat服务器webapps提示SpringBoot去除内嵌tomcat前端部署当项目开发完毕,只需要运行一行命令就可以打包你的应用# 打包正式环境npm run build:prod# 打包预发布环境npm run build:stage构建打包成功之后,会在根目录生成 dist 文件夹,里面就是构建打包好的文件,通常是 ***.js 、***.css、index.html 等静态文件。通常情况下 dist 文件夹的静态文件发布到你的 nginx 或者静态服务器即可,其中的 index.html 是后台服务的入口页面。环境变量所有测试环境或者正式环境变量的配置都在 .env.development (opens new window)等 .env.xxxx文件中。它们都会通过 webpack.DefinePlugin 插件注入到全局。常见问题如果使用Mac 需要修改application.yml文件路径profile如果使用Linux 提示表不存在,设置大小写敏感配置在/etc/my.cnf 添加lower_case_table_names=1,重启MYSQL服务如果提示当前权限不足,无法写入文件请检查profile是否可读可写,或者无法访问此目录

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧