MySQL Error Occured
1064: 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 'CubeCart_inventory.useStockLevel = '0' GROUP BY CubeCart_inventory.productId LIM' at line 1

QUERY = SELECT CubeCart_cats_idx.cat_id, CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel FROM CubeCart_cats_idx INNER JOIN CubeCart_inventory ON CubeCart_cats_idx.productId = CubeCart_inventory.productId WHERE sale_price > 0 CubeCart_inventory.useStockLevel = '0' GROUP BY CubeCart_inventory.productId