Answer the question
In order to leave comments, you need to log in
How to do a search by matching two or more words anywhere in mysql?
How to do a search by matching two or more words anywhere in mysql?
In this case, he is looking for matches of the entire sentence %$text%
. If we enter "Potato from Armenia" in the search, in the line Хорошая картошка из армении
- he will find a match, but
in the search Картошка хорошая из армении
, he will not find it.
How to search by matching all words in any sequence?
Answer the question
In order to leave comments, you need to log in
SELECT * FROM test
WHERE SOUNDEX(name)
LIKE CONCAT('%',SUBSTRING(SOUNDEX('Картошка хорошая из армении'),2),'%');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question