SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict madproject.com's Avatar
    Join Date
    Jan 2003
    Location
    Ottawa, Canada
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Coding a: "View next 2 articles >>"

    Ok, so when somebody views articles, it querys the database with a
    LIMIT 0,2 at then end of the SELECT statement.

    Now, say there are 4 articles, I only want 2 displayed per page. So I'll need a View Next 2 Articles >> at the bottom of my page.

    How would I code this?

    I have to pass 2 variables to my select to get my articles to display properly: category & date
    Free Picture and Video Hosting
    [http://photocabin.com][http://madproject.com]

  2. #2
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There are some good articles on Paging database results in Sitepoint... I'll see if I can find one.


    EDIT: Here's a couple:

    http://www.phppatterns.com/index.php...leview/25/1/1/
    http://www.sitepoint.com/article/662
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.


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
  •