SELECT SQL_CALC_FOUND_ROWS * FROM website WHERE 1 AND Id_Category=28 AND State=1 ORDER BY `In` DESC LIMIT -20, 20 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 1