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 pd_vizible != 0 AND pd_stoc = 0 AND pd_pretfix != 0 ORDER BY pd_price_b...' at line 3