SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Location
    New York, NY
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dividing Query Results into Different Pages

    Hello Guys!

    How are you?

    Well, I have built a MySQL database using PHP with approximately 100
    products.Whenever I run a query to see all the product names and
    prices with a link to see the details, the query returns the full list of
    available products in a long single page. What do you recommend that I
    do for the results to be divided into separate pages after each 25 rows?
    Something more like:

    "Search Results: 100 products

    Page 1 : (1-25)
    Page 2: (26-51)"
    etc.

    Is there a special keyword or technique to follow for that?
    Or, can you refer me to a tutorial article on that?

    I would really appreciate your help!

    Thanks,

    Dana22b.
    Live life to the fullest and have fun in the process!

  2. #2
    SitePoint Zealot LiamW's Avatar
    Join Date
    Mar 2003
    Location
    Hamilton, Ontario
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need to look into paginating your results.

    This is an OOP way of doing it. (actual code is a few pages in)

    This is a standard way of doing it.

    Good luck.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •