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 '< A.price1 && A. > 0, A., A.price1) as price, G.name as manufacturer_name, G....' at line 1