SELECT P.productID,P.productName,P.xOrder,P.seoUri,P.productSKU,P.brandName,P.USDproductPrice,P.USDspecialPrice,P.dateModified,DD.brandName AS designerBrandName,P.visibilityID,P.dateModified,P.dateAdded,P.isDTR,P.featuredID,P.productImg,P.instagramImg,P.productPrice,P.specialPrice,P.customField,GROUP_CONCAT(DISTINCT(PI.imageName) ORDER BY PI.imgXorder ASC) AS multiImg,SUM(PS1.productQuantity) AS stockCount
FROM fx_product AS P INNER JOIN fx_productimages AS PI ON P.productID=PI.productID
INNER JOIN fx_designer_details AS DD ON P.designerID=DD.designerID AND DD.status='1'
LEFT JOIN fx_product_specification AS PS1 ON P.productID=PS1.productID
WHERE P.status = 1 AND P.productStatus='0' GROUP BY P.productID HAVING stockCount>0 ORDER BY P.dateAdded DESC LIMIT -2,42 SELECT P.productID,P.productName,P.xOrder,P.seoUri,P.productSKU,P.brandName,P.USDproductPrice,P.USDspecialPrice,P.dateModified,DD.brandName AS designerBrandName,P.visibilityID,P.dateModified,P.dateAdded,P.isDTR,P.featuredID,P.productImg,P.instagramImg,P.productPrice,P.specialPrice,P.customField,GROUP_CONCAT(DISTINCT(PI.imageName) ORDER BY PI.imgXorder ASC) AS multiImg,SUM(PS1.productQuantity) AS stockCount
FROM fx_product AS P INNER JOIN fx_productimages AS PI ON P.productID=PI.productID
INNER JOIN fx_designer_details AS DD ON P.designerID=DD.designerID AND DD.status='1'
LEFT JOIN fx_product_specification AS PS1 ON P.productID=PS1.productID
WHERE P.status = 1 AND P.productStatus='0' GROUP BY P.productID HAVING stockCount>0 ORDER BY P.dateAdded DESC LIMIT -2,42 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 '-2,42' at line 5