我如何运行查询:
SELECT * FROM contacts WHERE MATCH(firstname,middlename,lastname) AGAINST ('Adam','Dustin')
当我使用两个词时它失败了,例如亚当和达斯汀,但当我使用一个词时它成功了。
尝试在行尾添加:IN BOOLEAN MODE(括号前)
例子:
SELECT * FROM Contacts WHERE MATCH(firstname,middlename,lastname) AGAINST ('Adam','Dustin' IN BOOLEAN MODE)
再见!:-D
SELECT * FROM contacts WHERE MATCH(firstname,middlename,lastname) AGAINST ('Adam Dustin')