我在下面得到以下錯誤,想知道我該如何解決這個問題?MySQL錯誤問題
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
這是我的MySQL代碼。
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
那麼我的代碼將如何? – HELP 2010-10-12 12:04:10
我現在得到這個錯誤'你的SQL語法有錯誤;檢查與您的MySQL服務器版本相對應的手冊,以找到在''附近使用的正確語法')AS no FROM用戶INNER JOIN articles_comments ON users.user_id = articles_c'at line 1' – HELP 2010-10-12 12:07:07
立即嘗試..... – 2010-10-12 12:10:52