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 'AND (IF(product.price2 > 0, product.price2, product.price) >= '0' AND IF(product' at line 2