select bbs.title as '标题',user1.username as '作者',user2.username as '回复人' from user as user1, user as user2,bbs left join

解决方案 »

  1.   

    Arbow(◎_◎) 
    你把正确的写出来呀,成功就给分!
      

  2.   

    帖子列表可以用这个:select bbs.title as '标题',`user1`.user_name as '作者',`user2`.user_name as '回复人'
    from `user` as user1, `user` as user2, `bbs` 
    where bbs.user_id = `user1`.user_id and bbs.reply_user_id = `user2`.user_id
      

  3.   

    SELECT * FROM bbs
     LEFT JOIN user ON bbs.user_id = user.user_id
     LEFT JOIN bbs_detail ON bbs.bbs_id = bbs_detail.bbs_id;
      

  4.   

    select bbs.title user.user_name user.user_name 
       from user bbs 
         where bbs.user_id=user.user_id  and user.user_id=bbs.reply_user_id
      

  5.   

    将你的表结构 Create Table ,
          表数据 Insert Into ,
    语句,
    以及需要的结果帖出来
      

  6.   

    我从没有用过两级left join,又长了一点见识
      

  7.   

    两级left join在书上看过,不过还没有用过:)
    10天前还不知道Join是什么,呵呵