How to do Paging in PHP

Discussion in 'PHP' started by Suhani, Apr 28, 2008.

  1. #1
    Hi Guys

    Can anyone please tell me what is the proper way of paging in PHP? Is there any need of database for paging? Please help me as i am new in php?

    Thanks & Regards
    Suhani:)
     
    Suhani, Apr 28, 2008 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    limit your query dynamically

    ie.


    select * from your_table limit 5,10;

    dynamically change your limit when a user change a page
    page 1 = limit 0, 10;
    page 2 = limit 11,10;
     
    bartolay13, Apr 29, 2008 IP
  3. PCaine

    PCaine Peon

    Messages:
    63
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Just try to figure out a mathematical formula for this, and should be very stable.
     
    PCaine, Apr 29, 2008 IP
  4. adrevol

    adrevol Active Member

    Messages:
    124
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #4
    adrevol, Apr 29, 2008 IP