Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

quick paging calculation question

 
John Schretz
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64843
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
John Schretz
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, Here is my solution. How does this look?

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic