SELECT * FROM `news`
WHERE `deleted` = '0'
ORDER BY `time` DESC
LIMIT $START, $END
When LIMIT = 0,10 it loads good.
When LIMIT is 10,20 it loads good.
When LIMIT is 20,30 it loads the last 4 rows already shown in 20,30 again…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way you’re using
LIMITis incorrect. It’s not,but rather,
From the MySQL documentation,
So for example,
If you don’t have enough rows in the resultset to fill the limit, it will just return up to the last row. For example, if you only retrieve 15 rows,
...LIMIT 10, 10would return rows 10-15.