我有这个要求,我正在使用 MySQl 数据库
评论表
id user id ariticle_id comment comment date
========================================================
1 45 2 comment1 02/03/12
2 45 2 comment2 03/03/12
3 45 2 comment3 04/03/12
4 45 2 comment4 05/03/12
5 45 2 comment5 06/03/12
6 45 5 comment7 04/03/12
7 45 5 comment8 05/03/12
8 45 5 comment9 06/03/12
文章表
id article_text article_date
============================================
2 Some text 01/03/12
2 updated text 04/03/12
5 another text 03/03/12
5 another updated text 04/03/12
我想从评论表和文章表中获取所有详细信息 userid、article_id、article_text、comment、comment_date
对于给定的文章 id =2 用户 id =45,并在更新文章后提供详细信息。
预期的输出是这样的
user_id article_id comment commentdate
45 2 comment3 04/03/12
45 2 comment4 05/03/12
45 2 comment5 06/03/12
我迷路了请帮忙,我正在尝试使用 MYSQL 中的查询