有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”时,第二页却不能显示记录!!
...全文
90 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里的东东可跳过,不看, 请指教!
基于强化学习的五子棋强化学习(Reinforcement Learning, RL),又称再励学习、评价学习或增强学习,是机器学习的范式和方法论之一。它主要用于描述和解决智能体(agent)在与环境的交互过程中通过学习策略以达成回报最大化或实现特定目标的问题。强化学习的特点在于没有监督数据,只有奖励信号。 强化学习的常见模型是标准的马尔可夫决策过程(Markov Decision Process, MDP)。按给定条件,强化学习可分为基于模式的强化学习(model-based RL)和无模式强化学习(model-free RL),以及主动强化学习(active RL)和被动强化学习(passive RL)。强化学习的变体包括逆向强化学习、阶层强化学习和部分可观测系统的强化学习。求解强化学习问题所使用的算法可分为策略搜索算法和值函数(value function)算法两类。 强化学习理论受到行为主义心理学启发,侧重在线学习并试图在探索-利用(exploration-exploitation)间保持平衡。不同于监督学习和非监督学习,强化学习不要求预先给定任何数据,而是通过接收环境对动作的奖励(反馈)获得学习信息并更新模型参数。强化学习问题在信息论、博弈论、自动控制等领域有得到讨论,被用于解释有限理性条件下的平衡态、设计推荐系统和机器人交互系统。一些复杂的强化学习算法在一定程度上具备解决复杂问题的通用智能,可以在围棋和电子游戏中达到人类水平。 强化学习在工程领域的应用也相当广泛。例如,Facebook提出了开源强化学习平台Horizon,该平台利用强化学习来优化大规模生产系统。在医疗保健领域,RL系统能够为患者提供治疗策略,该系统能够利用以往的经验找到最优的策略,而无需生物系统的数学模型等先验信息,这使得基于RL的系统具有更广泛的适用性。 总的来说,强化学习是一种通过智能体与环境交互,以最大化累积奖励为目标的学习过程。它在许多领域都展现出了强大的应用潜力。

28,391

社区成员

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

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