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 amp;sort = 'L_AskingPrice DESC' ORDER BY L_AskingPric' at line 1