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 'maxprice = '20000000' AND (LO1_BranchOfOrgID = '1308 ') AND LM_Char10_1 = 'Yes'' at line 1