I get the following error below and was wondering how can I fix it?
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
And here is my MySQL code (line breaks inserted so line 4 in error message corresponds to 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