Skip to Page number from results..

Discussion in 'PHP' started by puffyz, Apr 1, 2008.

  1. #1
    trying to think of best way to do this, I have a page which returns variable data sets....and have previous and next down x 15 results a page...

    But want to lay out the individual pages so can skip to them..

    ie

    Previous 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Next

    can click on any page # and skip that page of results..

    I know the total results, and I know which page I am on...

    Anyone know of something good to reference or good way to do this? Cause it wont be able to put out all pages all the time so it will be different...Thanks..
     
    puffyz, Apr 1, 2008 IP
  2. lanmonkey

    lanmonkey Active Member

    Messages:
    549
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #2
    use the mysql limit clause to only show so a certain amount of results. then setup each page link set to run a different limit clause

    link1 = pages 0-20
    link2 = pages 21-40
    etc..
     
    lanmonkey, Apr 4, 2008 IP