如何使用mysql全文搜索来搜索短语而不是像:
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
关于php - 如何使用MySQL全文搜索短语而不是使用LIKE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3908697/