Solved

Recordset counter

Posted on 2011-03-10
2
358 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
What You Need to Know when Searching for a Webhost Provider
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 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