Solved

Recordset counter

Posted on 2011-03-10
2
351 Views
Last Modified: 2013-12-24
When you using recordset paging how do you display on the page the page number out of the total count number and the record number out of the total count.

Example
Page # 5 out of 35
Record 20 out of 765

I would also like to do some thing like this if I could
1..(5)...35
0
Comment
Question by:overcolor
  • 2
2 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 35098514
0
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 500 total points
ID: 35098692
Adding the page numbers is simple. Just use the #perPage# value from the example. If you're showing 10 records per page:

      <cfset perPage    = 10>

The total pages is:
        <cfset totalPages = ceiling(yourQuery.recordCount / perPage)>

The starting record determines the current page number:
       <cfset thisPage   = ceiling(url.start / perPage)>

<cfoutput>
     perPage = #perPage#<br>
     totalPages = #totalPages#<br>
     thisPage = #thisPage#<hr>
</cfoutput>
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Configure IIS to process JSON 10 88
Problem with data displaying 2 28
How can i point a subdomain to directory? 5 30
Remove execute permissions from upload directories 4 15
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question