话不多说,请看代码:
php" id="highlighter_688639">
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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 ; } |
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持服务器之家!
原文链接:http://www.cnblogs.com/yangzailu/p/6404654.html