本文介绍了MySQL Match问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请参阅我以前的stackoverflow post 我正在尝试查找已发送消息中的相似之处通过以下方式:
Referring to my earlier stackoverflow post I'm trying to look for similarities in messages sent via the following:
SELECT id, MATCH (content) AGAINST (content) AS score FROM pms_messages WHERE sender_id = '.$sender_id.' AND MATCH (content) AGAINST (content) AND score > 1;
我看到错误:#1210-AGAINST的参数不正确
I see the error: #1210 - Incorrect arguments to AGAINST
我在内容字段上设置了FULLTEXT索引.来自phpmyadmin:
I've set a FULLTEXT index on my content field. From phpmyadmin:
Edit Drop fulltext_index FULLTEXT No No content 1
我想念什么?
推荐答案
当收到错误消息时,请务必阅读本手册,它对您的帮助最快:
Always read the manual when you get an error message, it's helpful most quickly:
参考: http://dev.mysql. com/doc/refman/5.0/en/fulltext-search.html#function_match
因此,您尝试实现的目标是错误的.使用文字字符串而不是列名.
So what you try to achieve is done wrong. Use a literal string instead of a column name.
另请参见 11.9.5.全文限制 ,特别是:
这篇关于MySQL Match问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!