1
I have a search system in Mysql + PHP, it does the search like this:
$nome = "Treinamento Da Venda à Entrega (Teste)";
$sqlPost = "SELECT id FROM tabela WHERE nome LIKE '%$nome%'";
$resultPost = mysql_query($sqlPost);
$buscou = mysql_num_rows($resultPost);
echo $buscou;
In the bank I have the following registered name:
Treinamento Da Venda à Entrega (Teste)
If I seek the word sale, he thinks, for handover he does, but I’m looking for exactly Sale-to-Delivery Training (Test) he doesn’t think, I’m using the wrong LIKE?
What I realized is that he only searches for one word, if I put more than one he doesn’t think.
Passes the complete code snippet
– Andre Lacomski
Hi, I put, I found it kind of irrelevant, because the doubt is more in the way LIKE works than in the code itself.
– caiocafardo