I have a table with 53 rows. My sql statement looks like this:
SELECT * FROM table LIMIT 1 , 100
It is showing me 52 rows instead of 53. What gives? Of course when I run:
SELECT * FROM table
It returns 53 rows as it should.
What is the best way to fix this, so that I can have a limit if I need it?
When you use
LIMIT x, y, the first value is an offset. SoLIMIT 1, 100means to skip the first 1 record, and show rows 2 through 101. To get the first 100 rows without skipping any, writeLIMIT 0, 100or simplyLIMIT 100.