WHERE MATCH (name) AGAINST ('term') is not working?
I used wildcards for the query
$query = mysql_query("SELECT id FROM products WHERE name LIKE '%$term%'");开发者_JS百科
and it gives me the results. but when I use
$query = mysql_query("SELECT id FROM products WHERE MATCH (name) AGAINST ('$term')");
it does not show me any. Why is that ?
As there is only one product, you might run into the 50% threshold:
In addition, words that are present in 50% or more of the rows are considered common and do not match. Full-text searches are natural language searches if no modifier is given.
Full Text Search
精彩评论