主题:  我的分页出问题了,谁能帮我看看,在下感激不进

adolfty

职务:普通成员
等级:1
金币:0.0
发贴:1
注册:2005/11/6 4:37:54
#12005/11/8 0:17:27
<sscfset setEncoding("URL","gb2312"><cfset setEncoding("Form","gb2312"><CFCONTENT TYPE="text/vnd.wap.wml;charset=UTF-8"><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org
/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="max-age=0"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
</head>

<card id="add" title="蓝色移动留言本">
<p><a href="add.cfm">添加留言</a>&nbsp;&nbsp;<a href="manager.cfm">管理留言</a>></p>

<cfquery name="guestbook1" datasource="Mobile">
SELECT book_id,book_name,book_date,book_content FROM guestbook where book_visibile=0 Order BY book_id DESC
</cfquery>
<!---定义分页变量--->
<cfset maxrows="5">
<cfparam name="url.startrow" default="1">
<cfif #url.startrow# is not "1">
<cfset UpRow=#url.startrow#-#maxrows#>
<cfelse>
<cfset UpRow="1">
</cfif>
<cfset DownRow=#url.startrow#+#maxrows#>
<cfif #DownRow# gt #guestbook1.recordcount#>
<cfset DownRow="#url.startrow#">
</cfif>
<cfif (#guestbook1.recordcount# mod #maxrows#) is 0>
<cfset lastrow=#guestbook1.recordcount#-#maxrows#+1>
<cfelse>
<cfset lastrow=(#guestbook1.recordcount#\#maxrows#)*#maxrows#+1>
</cfif>
<!---定义分页变量结束--->

<cfoutput query="guestbook1" startrow="#url.startrow#" maxrows="#maxrows#">
<p>----ID:#book_id#----<br/>
[#book_name#]<br/>
(#book_date#)<br/><br/><br/>
#book_content#<br/></p>
</cfoutput>
<!---分页结束--->
<cfquery name="NumberCount" datasource="Mobile">
SELECT Count(book_id) as Cn FROM guestbook
</cfquery>
<p>
共<cfoutput query="NumberCount">[#Cn#]个留言&nbsp;&nbsp;第#UpRow#/#lastrow#页</cfoutput>
</p>
<!---开始分页--->
<cfoutput>
<p align="left"><a href="index.cfm">首页</a>&nbsp;<a href="index.cfm?startrow=#uprow#">上一页</a>&nbsp;<a href="index.cfm?startrow=#DownRow#">下一页</a>&nbsp;<a href="index.cfm?startrow=#lastrow#">尾页</a></p>
</cfoutput>
<p><anchor><prev/>返回上一页</anchor><br/><a href="add.cfm">添加新留言</a><br/><a href="index.cfm">[返回留言本首页]</a><br/><a href="../index.cfm">[返回蓝色移动首页]</a>
</p>
</card>
</wml>