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 '-25,25' at line 1; Query: SELECT * FROM `md_market` where (`category` = '11146') and enabled = 0 ORDER BY `order` desc LIMIT -25,25