Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Result As Pages 1

Status
Not open for further replies.

Ikramy

Programmer
Jul 10, 2001
15
AE
<CFSET maxrows = 10>
<CFPARAM name=&quot;start&quot; default=&quot;1&quot;>

<CFOUTPUT query=&quot;queryname&quot; start=&quot;#start#&quot; maxrows=&quot;#maxrows#&quot;>
display query result here …
</CFOUTPUT>

<CFSET pages = #ceiling(queryname.recordcount / maxrows)#>
<CFLOOP from=&quot;1&quot; to=&quot;#pages#&quot; index=&quot;idx&quot;>
<CFOUTPUT>
<CFSET TMP = idx * maxrows + 1 - maxrows>
<a href=&quot;thispage.cfm?start=#TMP#&quot;>#idx#</a>
</CFOUTPUT>
</CFLOOP>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top