我给你举个例子吧 ,按照你上面举得例子:
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'];
}
}