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 ') or (title like '%%EA%B0%95%EC%8B%A0%ED%98%B8%' or body like '%%EA%B0%95%EC%...' at line 1 select count(*) from ins_news where () or (title like '%%EA%B0%95%EC%8B%A0%ED%98%B8%' or body like '%%EA%B0%95%EC%8B%A0%ED%98%B8%' or name like '%%EA%B0%95%EC%8B%A0%ED%98%B8%' or id='%EA%B0%95%EC%8B%A0%ED%98%B8'))