开发者

What's the opposite of MATCH AGAINST?

I know:

WHERE MATCH(title,cat开发者_Go百科egory) AGAINST ('text')

But what if I want to say 'text' cannot not be anywhere in title or category?

Many thanks

Darren


Use "IN BOOLEAN MODE" with the '-' specifier

WHERE MATCH (title,category) AGAINST ('-text' IN BOOLEAN MODE);

http://dev.mysql.com/doc/refman/5.0/en/fulltext-boolean.html


You could try the following:

SELECT * FROM whatever WHERE MATCH (title,category) AGAINST ('-text' IN BOOLEAN MODE);


Is there any problem with using WHERE NOT MATCH(title,category) AGAINST ('text')?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜