$tieba_list= Db::name("tieba")->alias("a")
->join("tieba_pics p", "a.id=p.tid", 'LEFT')
->join("admin_upload b", "p.cover=b.id", "LEFT")
->join("member m", "a.user_id=m.id", "LEFT")
->join("tieba_list c","a.cate_id=c.id","LEFT")
->field("a.id,c.cate_name,a.title,m.username,b.url,a.content,a.create_time")
->order("a.id desc")
->limit(6)
->select();
thinkphp多表查询输出:
数据重组:
$newArray =