Jump to content


Photo

SQL Pagination??


  • Please log in to reply
2 replies to this topic

#1 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 06 October 2006 - 10:27 PM

Hey,
I've got a small script, which basically gathers information
from my table which will be shown on my "Biographies" page
the thing is it is aimed to have 8 biographies per page, I want
the database to go from id 1 -> the last ID.

The problem is I have scripted it to only show biographies
which are accepted by a moderator.

Example; each Line repreisents when clicked ...extention number (ie: 10,15,20):
< Prev | 1 | 2 | 3 | 4 | 5 | ...10 | Next >
< Prev | 10 | 11 | 12 | 13 | 14 | ...15 | Next >
< Prev | 15 | 16 | 17 | 18 | 19 | ...20 | Next >

#2 php_coder_dvo

php_coder_dvo
  • Members
  • PipPip
  • Member
  • 18 posts
  • LocationPhilippines

Posted 06 October 2006 - 10:34 PM

last_page = total_page / view_per_page

use ceil function to get the value as a whole number.

#3 xyn

xyn
  • Members
  • PipPipPip
  • Advanced Member
  • 779 posts
  • LocationNorthampton

Posted 06 October 2006 - 10:40 PM

I'm confused, how Am i supposed to use that? :s




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users