Home > Q&A > body text
How does thinkphp determine whether the username already exists in the database
新鲜的**鸡腿2018-08-08 21:25:07
$db_username = Db::name('用户表')->where('username','=','用户名')->find();
if($db_username != 0){
echo 'Username already exists';
}