在Join中使用FIND_IN_SET

在Join中使用FIND_IN_SET_第1张图片

 

 

$d['a.cold'] = 2;
$d['b.PostId'] = $up_id['PostId'];
$d['b.F_Id'] = $up_id['Id'];

$d['WorkinTime'] = array('lt',$lastday);

$down2 = Db::name('admin_user')
->field('a.*,a.Id as user_Id,b.*')
->alias('a')
// ->join('role b','a.RoleId= b.Id ')
->join('role b','FIND_IN_SET(b.Id,a.RoleId)')

->where($d)
->select();

你可能感兴趣的:(在Join中使用FIND_IN_SET)