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 'AND a.PRECO_A <> '0.000000' AND a.PRECO_B <> '0.000000' AND a.PRECO_C <> '0.0000' at line 41