aspose file tools*
The moose likes JSP and the fly likes quick paging calculation question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "quick paging calculation question" Watch "quick paging calculation question" New topic
Author

quick paging calculation question

John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
I am using the below to calculate my page links, using LIMIT in the DB portion.

The total count is 127. This should generate 7 pages but it is only generatong 6 because the division is calculation 6.35. How would i push it to generate the 7th page?


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

The modulo operator can be used to determine if there is a remainder after division.

P.S. Re-evaluate your HTML usage. The <font> tag is long deprecated in favor of CSS.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
lol yea they was left from an old example i was using from my previous paging tags that i am replacing with this code
[ November 24, 2008: Message edited by: John Schretz ]
John Schretz
Ranch Hand

Joined: Sep 10, 2008
Posts: 188
Ok, Here is my solution. How does this look?

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: quick paging calculation question