You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-10,10' at line 2 SELECT product.id FROM product LEFT JOIN section_has_product ON section_has_product.product_id = product.id WHERE
section_has_product.section_id = 502 ORDER BY product.poradi LIMIT -10,10