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 '-15,15' at line 1 SELECT num_ref, nom_ref, date_ref FROM ref WHERE 1=1 ORDER BY ordre_ref DESC LIMIT -15,15