Thread: LIMIT bug?

    #1
  1. No Profile Picture
    pnoren
    Guest
    Devshed Newbie (0 - 499 posts)
    SELECT id, title, genre, price FROM Pictures WHERE title LIKE '% %' ORDER BY title LIMIT 5,10
    As I understand it - with the following command I should get the result between 5 and 10 (5 posts) but I get 7 posts!?

    Is this a bug or have I missunderstood the use of LIMIT?

    When i Use the same query with LIMIT 0,5 I get 5 posts.
  2. #2
  3. No Profile Picture
    PhOrPhEr
    Guest
    Devshed Newbie (0 - 499 posts)
    LIMIT 10,5 = Get 5 posts begin from 10.

    example:
    select * from tb1 limit 10,5;
    This will get row nr. 10 to 15
  4. #3
  5. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    IOW, you are requesting 10 rows beginning at 5. If you query only results in 12 matches then you'd get 7 rows.

Similar Threads

  1. IE positioning bug and its solution
    By delerious in forum HTML Programming
    Replies: 3
    Last Post: December 23rd, 2003, 04:42 AM
  2. Displaying top 5 rows in DB using LIMIT
    By theDano in forum MySQL Help
    Replies: 4
    Last Post: October 30th, 2003, 03:26 PM
  3. Very strange bug, vars ignored.
    By Kristten in forum PHP Development
    Replies: 7
    Last Post: June 25th, 2003, 12:26 PM
  4. socket limit? Perl or OS?
    By noslenj123 in forum Perl Programming
    Replies: 5
    Last Post: October 2nd, 2002, 08:43 PM
  5. php cant get it running
    By wheels in forum PHP Development
    Replies: 2
    Last Post: July 24th, 2000, 03:21 PM

IMN logo majestic logo threadwatch logo seochat tools logo