开发者

WHERE MATCH (name) AGAINST ('term') is not working?

开发者 https://www.devze.com 2023-03-22 09:32 出处:网络
I used wildcards for the query $query = mysql_query(\"SELECT id FROM products WHERE name LIKE \'%$term%\'\");开发者_JS百科

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

精彩评论

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