简化mysql全文搜索

时间:2010-08-04 04:24:26

标签: mysql

立即对wordAwordBwordC进行文字搜索,我这样做:

SELECT * FROM 
    mytable 
WHERE
    MATCH (field1) AGAINST ('wordA' IN BOOLEAN MODE) OR
    MATCH (field1) AGAINST ('wordB' IN BOOLEAN MODE) OR
    MATCH (field1) AGAINST ('wordC' IN BOOLEAN MODE)

是否有更紧凑的写作方式?

1 个答案:

答案 0 :(得分:0)

刚刚解决了这个也会起作用

SELECT * FROM 
    mytable 
WHERE
    MATCH (field1) AGAINST ('wordA/wordB/wordC' IN BOOLEAN MODE)