gpt4 book ai didi

sql - MySQL SQL语法错误问题?

转载 作者:行者123 更新时间:2023-12-01 00:32:35 25 4
gpt4 key购买 nike

<分区>

我在下面收到以下错误,想知道如何修复它?

You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near '.user_id WHERE
users.active IS NULL AND users.deletion = 0) WHERE users.active' at line 4

这是我的 MySQL 代码(插入换行符,因此错误消息中的第 4 行对应于第 8 行)。

SELECT users.user_id, articles_comments.article_id, articles_comments.comment,
articles_comments.comment_id
FROM users_articles
INNER JOIN articles_comments
ON users_articles.id = articles_comments.article_id
INNER JOIN (SELECT *
FROM users INNER JOIN users_articles.user_id = users.user_id
WHERE users.active IS NULL AND users.deletion = 0)
WHERE users.active IS NULL
AND users.deletion = 0
ORDER BY articles_comments.date_created DESC
LIMIT 50

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