如何使用 mysql 全文搜索来搜索短语而不是 like :
SELECT description FROM t WHERE info LIKE "%Search phrase one%" OR info LIKE "%Phrase second%" OR info LIKE "%Another phrase with more words%"
以下是搜索短语的示例查询:
SELECT * FROM table WHERE MATCH ( col1,col2,col3 )
AGAINST ('"some words" "another phrase"' IN BOOLEAN MODE);
更多信息请访问:http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)