|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
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
|
|||
|
|||
|
LIMIT 10,5 = Get 5 posts begin from 10.
example: select * from tb1 limit 10,5; This will get row nr. 10 to 15 |
|
#3
|
|||
|
|||
|
IOW, you are requesting 10 rows beginning at 5. If you query only results in 12 matches then you'd get 7 rows.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > LIMIT bug? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|