Search is not working

Hello dear Community!

I'm new in the Database world and I have a question:

SELECT * FROM `suche` WHERE `titel` LIKE '%üfug0ew u9+ie0r%' OR `snippet` LIKE '%üfug0ew u9+ie0r%' OR `text` LIKE '%üfug0ew u9+ie0r%' AND `kategorie` LIKE 'Geschichte' OR `kategorie` LIKE 'Informationen' OR `kategorie` LIKE 'Neuigkeiten' OR `kategorie` LIKE 'Fakten rund um den Ort' OR `kategorie` LIKE 'Dir ist langweilig?' ORDER BY `suche`.`erstellungs_datum` DESC

and the result is:

3 ** | Schreibrichtlinien http://******************/login/webmasters... Die Schreibrichtlinien der Webseite für **... Schreibrichtlinien *.de Schreibricht... 2021-03-07 2021-04-01 Leo Schneider http://******************/bilder/login/web... Informationen

But why? There's nowhere üfug0ew u9+ie0r.

Thanks for answers

Answer Answered by Ian Gilfillan in this comment.

You are not only searching for üfug0ew u9+ie0r but also various categories. You probably need to use parenthesis to sort out your precedence, for example:

SELECT ... WHERE (... OR ... OR ...) AND (... OR ... OR ...)

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.