Mysql FullText,匹配...和@在搜索字段中

时间:2014-02-20 13:00:30

标签: mysql full-text-search match against

select 
    count(distinct email_address)
from
    users
WHERE
    MATCH (email_address) AGAINST ('@rossi.it' );

问题:查询搜索不会搜索'@rossi.it',但仅搜索'rossi.it'

如何修改查询以包含“@”?

1 个答案:

答案 0 :(得分:0)

如果使用反斜杠来转义@字符,请执行以下操作:

WHERE
   MATCH (email_address) AGAINST ('\@rossi.it');

这解决了吗?