MYSQL: Like Method, Similar Words - But Don't Show the Searched Word
Posted
by elmaso
on Stack Overflow
See other posts from Stack Overflow
or by elmaso
Published on 2010-03-30T16:34:48Z
Indexed on
2010/03/30
16:43 UTC
Read the original article
Hit count: 538
Hello, actually i use this method to show similar words for a search request..
$query = "SELECT * FROM searches WHERE Query LIKE '%$search%' ORDER BY Query";
if someone searches for "nelly" it looks up in the database for similar words
"nelly furtado, nelly ft. kelly"...
but i dont want to show up the searched word..
example: you've searched for nelly - try this too: nelly, nelly furtado, nelly ft.,
the bold word should not showed up again, because it's the searched word.. is there maybe a method with MATCH AGAINST? thank you!
© Stack Overflow or respective owner