thinkphp怎么获取数据库数据

2024-11-06 08:37:43
推荐回答(1个)
回答(1):

我给你举个例子吧 ,按照你上面举得例子:
use Think\Controller;
class LoginController extends Controller {
public function login(){
$User = M('user');
$condition['email'] = I("post.email",'',email);
$user_result = $User->where($condition)->select();
$userpass = $user_result['userpass'];
}
}