SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict mh8759's Avatar
    Join Date
    Jun 2000
    Location
    Slovenia, Europe
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I have a database of articles. What I would like to do is to select a certain number of articles from it let's say from article number 5(ID=5) to article number 10(ID=10).
    How can I do that, I mean how can I select articles somewhere from the middle of the database?

    Thanks in advance,
    Mare

  2. #2
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this query:
    SELECT * FROM table LIMIT 5, 5

    The first 5 = starting index
    The second 5 = increase by 5, so it will be from 5-10

    Hope this works!!!
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy


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
  •