开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜