php根据用户名和手机号查询是否存在手机号码

话不多说,请看代码:

public function CheckMobileUser($data){

$sql='select phone,username from wlzbpre_user where phone="'.$data['phone'].'" or username="'.$data['phone'].'" and status="1" limit 1';

$phone=M()->query($sql);

$phone =$phone[0]['phone'];

$username=$phone[0]['username'];

if(empty($phone)){

$remark=array(

'RespCode'=>'081',

'RespDesc'=>'手机号/用户名不存在',

'AcctDetails'=>array('token'=>''),

);

}else{

$remark=array(

'RespCode'=>'000',

'RespDesc'=>'手机号已存在',

'AcctDetails'=>array('phone'=>$phone,'username'=>$username),

);

}

return $remark;

}

以上是 php根据用户名和手机号查询是否存在手机号码 的全部内容, 来源链接: utcz.com/z/348429.html

回到顶部