```
$subQuery = Db::table('zhi_user_profit a')
->where('group',5)
->order('create_time desc')
->limit(10000000000)//不加这一行代码就有可能出现不是最新的代码
->buildSql();//构建查询语句
$lists = Db::table($subQuery.' a')
->join(config('prefix').'user_info b','a.user_id=b.id')
->where( "a.user_name_old|b.phone",'like',"%{$keyword}%" )
->field('a.*,b.phone')
->order('create_time','desc')
->group('user_id')->fetchSql(true)
// ->paginate(15,null,['query'=>$param]);
->select();
```
网友评论