I get the following error below and was wondering how can I correct this problem?
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 'IF(articles_comments.parent_comment_id = articles_comments.comment_id AND users.' at line 4
Here is my MySQL code.
SELECT *
FROM users
INNER JOIN articles_comments ON users.user_id = articles_comments.user_id
IF(articles_comments.parent_comment_id = articles_comments.comment_id AND users.active IS NULL AND users.deletion = 0) AS no
AND users.active IS NULL
AND users.deletion = 0