为什么我从此查询中收到MySQL错误?
SELECT *, MATCH($SW) AGAINST(reb, keb, gloss) as Score
FROM dictionary
WHERE MATCH($SW) AGAINST(reb, keb, gloss)
ORDER BY Score DESC;
我正在尝试测试全文搜索,但我似乎无法创建一个有效的查询。
答案 0 :(得分:0)
如果您提供错误消息会很好,但我想我可以猜测修复。你忘了引用字符串了:
SELECT *, MATCH('$SW') AGAINST(reb, keb, gloss) as Score
FROM dictionary
WHERE MATCH('$SW') AGAINST(reb, keb, gloss)
ORDER BY Score DESC;