-
1
- #1
<CFSET maxrows = 10>
<CFPARAM name="start" default="1">
<CFOUTPUT query="queryname" start="#start#" maxrows="#maxrows#">
display query result here …
</CFOUTPUT>
<CFSET pages = #ceiling(queryname.recordcount / maxrows)#>
<CFLOOP from="1" to="#pages#" index="idx">
<CFOUTPUT>
<CFSET TMP = idx * maxrows + 1 - maxrows>
<a href="thispage.cfm?start=#TMP#">#idx#</a>
</CFOUTPUT>
</CFLOOP>
<CFPARAM name="start" default="1">
<CFOUTPUT query="queryname" start="#start#" maxrows="#maxrows#">
display query result here …
</CFOUTPUT>
<CFSET pages = #ceiling(queryname.recordcount / maxrows)#>
<CFLOOP from="1" to="#pages#" index="idx">
<CFOUTPUT>
<CFSET TMP = idx * maxrows + 1 - maxrows>
<a href="thispage.cfm?start=#TMP#">#idx#</a>
</CFOUTPUT>
</CFLOOP>