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 'l.attr(' AND query LIKE 'information_id%'' at line 1: SELECT query FROM store_url_alias WHERE keyword='' l.attr(' AND query LIKE 'information_id%'