MySQL Match Against with Multiple Values to AGAINST

我的梦境 提交于 2019-12-10 11:45:23

问题


I think this is a very simple query but I just can't find it in any of my programming books or on the net.

I have this query: SELECT * FROM test WHERE MATCH (column1,column2) AGAINST ('value1');

But I need AGAINST to have multiple values e.g. (value1,value2,value3)

can anyone help?


回答1:


I think the BOOLEAN MODE modifier might be what you are looking for.

SELECT * FROM test WHERE MATCH (column1,column2) 
     AGAINST ('+value1 +value2 +value3' IN BOOLEAN MODE);


来源:https://stackoverflow.com/questions/15239156/mysql-match-against-with-multiple-values-to-against

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!