thinkphp下mysql用用户名或者手机号登录

前端之家收集整理的这篇文章主要介绍了thinkphp下mysql用用户名或者手机号登录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="cnblogs_code">

$res=$user->where("login_id='{$username}' OR phone='{$username}'")->find();
sql='select phone,login_id from pro_cuser where phone="'.$data['phone'].'" or login_id="'.$data['phone'].'" and status="1" limit 1';
原文链接:https://www.f2er.com/thinkphp/67918.html

猜你在找的ThinkPHP相关文章