MySQL Error (1064): 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 `handoverMethod`=`handoverMethod`' at line 1 Query: SELECT DISTINCT method_id FROM `supplier_to_paymentmethod` WHERE `supplier_id`= AND `handoverMethod`=`handoverMethod`