gpt4 book ai didi

mysql - sql Match() 针对无法识别的情况

转载 作者:行者123 更新时间:2023-11-29 07:05:00 25 4
gpt4 key购买 nike

当我尝试这个查询时

SELECT name, cost FROM items WHERE MATCH (name) AGAINST ('baby')

phpmyadmin 给我一个警告,指出:

Unrecognized keyword. (near "MATCH" at position 43)
Unexpected token. (near "(" at position 49)
Unexpected token. (near "name" at position 50)
Unexpected token. (near ")" at position 58)
Unrecognized keyword. (near "AGAINST" at position 60)
Unexpected token. (near "(" at position 68)
Unexpected token. (near "'baby'" at position 69)
Unexpected token. (near ")" at position 74)

它仍然显示正确的结果。当我尝试另一个查询时:

SELECT fisrt_name , country FROM people WHERE MATCH (first_name) AGAINST ('marr')

它只给我和错误而没有得到结果。我有什么错误吗?

编辑:我更新了 phpmyadmin 但我得到的是新的错误消息

 Can't find FULLTEXT index matching the column list

最佳答案

ALTER TABLE people ADD FULLTEXT people_first_name(first_name);

尝试在列first_name上添加全文索引,然后重试查询。

关于mysql - sql Match() 针对无法识别的情况,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42059281/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com