1
I’m mounting a search in the database where the user informs an example text: "how to configure windows".
Currently I have a select
which works as follows:
$query = "SELECT resposta FROM suporte where pergunta like '%".$s."%'";
Where $s
has the value to configure windows.
My idea would be to take this string and break word by word where the select
final would be:
SELECT resposta FROM suporte where pergunta like '%como%' and pergunta like '%configurar%' and pergunta like '%o%' and pergunta like '%windows%'
Someone would have an example of how to proceed in this case?
Detail I’m using PHP as a language
Do you know the concept of Elastic search? Maybe it solves your problem.
– Woss
It would be interesting if the people who denied the question explained why.
– Ronaldo Araújo Alves
Hello Eder Luca, it is very important we inform the language you are using to facilitate your help
– Gabriel Souza
Depending on the language you can use interpolation!
– Gabriel Souza
sorry I just forgot to comment I’m using the php language
– Eder Luca