ABC という 3 つのテーブルがあり、3 つすべてから情報を取得しようとしています。
A には columnns userid avatar username があり、B には列 postid、dateshared があり、C には列 commenter postid datecommented があります。
クエリを実行しようとしています
Select C.comment, C.commenter, C.datecommented, B.postid, B.dateshared A.username A.avatar from B Left Join C Left join A on C.postid = B.postid AND A.userid = C.commenter where B.postid IN ('1','2','3') order by C.dateshared desc
しかし、次のエラーが発生します。
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 'where B.postid IN ('1', '2', '3') order by C.dateshared '
誰かが私が間違っていることを指摘したり、その方法を提案したりできますか?