Error: SELECT p.ID as ProductID,p.FeatureContentsID FROM alt_products as p, alt_productsorders as po, alt_priceorderlimit as pol WHERE po.Language = '1' AND ( (SELECT count(*) FROM alt_productsgroupval as pv WHERE pv.ProductID = p.ID AND pv.ProductsGroupID = ) > 0 ) AND (p.BatchRadio!=1 or p.BatchRadio=1 AND BatchShow='on') AND po.ProductID = p.ID AND p.Status = 1 AND po.CategoryID = '114' GROUP BY po.ProductID ORDER BY p.Price1 DESC

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 ') > 0 ) AND (p.BatchRadio!=1 or p.BatchRadio=1 AND BatchShow='on') AND po.Prod' at line 1