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 '-9, 1000' at line 1 : select * from yp_product inner join yp_product_cat on yp_product.product_id = yp_product_cat.product_id inner join yp_category on yp_category.category_id = yp_product_cat.category_id where yp_product.product_status='Active' order by yp_product.product_name limit -9, 1000