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')
?
精彩评论