gpt4 book ai didi

mysql - mySQL 查询错误

转载 作者:行者123 更新时间:2023-11-29 21:48:10 25 4
gpt4 key购买 nike

我有以下查询,我希望仅返回与 label_name“Ultra Music”匹配的记录,但它返回任何 label_name:

SELECT  `chart_rating` . * , SUM( chart_rating.rating_score ) AS total_score, release.release_label
FROM `chart_rating`
INNER JOIN `release` ON `chart_rating`.`rating_release_id` = `release`.`id`
WHERE MATCH (
release.release_label
)
AGAINST (
"Ultra Music"
IN BOOLEAN MODE
)
GROUP BY `rating_release_id`
ORDER BY `total_score` DESC

我对release_artist有一个几乎相同的查询,它运行得很好。

这个查询有什么问题?

最佳答案

By default (when neither + nor - is specified) the word is optional, but the rows that contain it are rated higher. This mimics the behavior of MATCH() ... AGAINST() without the IN BOOLEAN MODE modifier.

MySQL Ref - Bool

关于mysql - mySQL 查询错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33916219/

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