$where=[];
if(!empty($post['id'])){
$where[]=['id','<>',$post['id']];
}
$where[]=['email','=',$post['email']];
$userExist = db('crm_leads')->field('email,pr_user')->where($where)->find();
相关文章
$where=[];
if(!empty($post['id'])){
$where[]=['id','<>',$post['id']];
}
$where[]=['email','=',$post['email']];
$userExist = db('crm_leads')->field('email,pr_user')->where($where)->find();