I currently use a MS SQL Database, with a << previous |
next >> reocord
navigator. But the problem is users cant jump back to the
start or end
without paging through all the results. heres my current code
<!------Number of records to display---------->
<cfparam name="StartRow" default="1">
<cfparam name="MaxRows" default="8">
<cfset Previous=Val(StartRow)-Val(MaxRows)>
<cfset Next=Val(StartRow)+Val(MaxRows)>
<!---------Calculate variable for display xx-xx of total
records-------->
<cfset display=StartRow+MaxRows-1>
<cfif #display# gt query.recordcount>
<cfset display=query.recordcount>
</cfif>
<!----- Previous/next buttons--------->
<cfoutput>Products #StartRow# - #display# of
#query.recordcount#</cfoutput><br />
<cfoutput><cfif Previous GT 0>
<a
href="#client.URLtemplates#/security_locks.cfm/hurl/StartRow=#Previous#/security_locks.cfm">??
BACK</a>
</cfif></cfoutput><cfoutput>
<cfif Next LTE query.recordcount>
<a
href="#client.URLtemplates#/security_locks.cfm/hurl/StartRow=#Next#/security_locks.cfm">|
NEXT ??</a>
</cfif></cfoutput>
"Grizzly9279" <webforumsuser@macromedia.com> wrote in
message
news:fbp032$fsk$1@forums.macromedia.com...
> The problem is there are a hundred different ways to go
about doing this.
> How
> are you currently querying your data, and what DBMS are
you working with?
> Each DBMS has its own best-practices on paginating
queries.
>