public function wocaotuijian(){
$list=Db::table('xc_tuijiansum')->alias('a')
->join('xc_member me','a.uid=me.uid','left')
->where(['a.success'=>2])
->field('a.id,me.nicheng,a.tid,a.time')->order('a.time desc')->select();
foreach($list as $k=>$v){
$n=Db::table('xc_member')->where(['uid'=>$v['tid']])->value('nicheng');
array_push($list[$k],$n);
}
$this->assign('list',$list);
return $this->fetch('zgxc/wokao');
}
一个表关联两次另一个表降序排序desc
最新推荐文章于 2022-07-28 20:09:58 发布