PHP Paging

Discussion in 'PHP' started by gr8webseller, Dec 14, 2009.

  1. #1
    I am having a doubt in PHP paging,,, i think most of the php programmers aware of paging,,

    i checked lots of php paging tutorials and i did not found what i want

    all tutorials deals with just selecting all data from database and displaying them by breaking up into pages, but i don't want that,,,,

    i want tutorial for these methods,

    1. select some number of data, and want to break them into page,

    for eg, if database has 1000 data, i want to select only first 100 data and break them into page,,,

    2. select all data from database and show the result as search engine shows, eg, Google,, first it shows 1 - 10 links, when i click 10, it will show 11,12,13, etc.,

    i can't find tutorials for these,, please help me with this
     
    gr8webseller, Dec 14, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Bohra, Dec 14, 2009 IP
  3. astkboy2008

    astkboy2008 Peon

    Messages:
    211
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How To Create A Pagination In PHP
    http://www.jooria.com/PHP-Pagination-a125.html
    Code (markup):
     
    astkboy2008, Dec 14, 2009 IP
  4. yoes_san

    yoes_san Peon

    Messages:
    443
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    for 100 result per page: on first page just do "select * from something limit 0,100"

    on next page do something like "select * from something limit 100,100"

    on each page just calculate new 'start index' for select statement and that's it
     
    yoes_san, Dec 14, 2009 IP