Zend framework ZF/条令问题

Zend framework ZF/条令问题,zend-framework,doctrine,Zend Framework,Doctrine,我们正在一个项目中使用Zend框架和条令。我已经使用ORM安装了应用程序 当我回显该语句时,它只打印“FROM User u WHERE u.username=?” 什么是“条令查询::创建()” 需要图书馆吗 public function loginAction(){ $error_messages = array(); $params = $this->_request->getParams(); if($_POST) {

我们正在一个项目中使用Zend框架和条令。我已经使用ORM安装了应用程序

当我回显该语句时,它只打印“FROM User u WHERE u.username=?”

什么是“条令查询::创建()”

需要图书馆吗

public function loginAction(){      
    $error_messages = array();

    $params = $this->_request->getParams();
    if($_POST)
    {
        $params = $this->_request->getParams();

        $username = $params['username'];
        $password = $params['password'];

        $query = Doctrine_Query::create()
            ->from('User u')
            ->where('u.username = ?',$username);
        echo    $query;
        exit;
        $user = $query->execute()->getFirst();

        //Authentication !
        $authexAdapter = new Application_Auth_exAdapter($user,$password);           
        $authResult = Zend_Auth::getInstance()->authenticate($authexAdapter);

        if(!$authResult->isValid()){
            $error_messages = $authResult->getMessages();
        } else {
            //sucess!

                    $this->_redirect('account/setup');

        }
    }
    $this->view->error_messages = $error_messages;
}    
它创建将运行以查找对象的查询。回显对象时,它会打印创建的字符串查询

需要图书馆吗

public function loginAction(){      
    $error_messages = array();

    $params = $this->_request->getParams();
    if($_POST)
    {
        $params = $this->_request->getParams();

        $username = $params['username'];
        $password = $params['password'];

        $query = Doctrine_Query::create()
            ->from('User u')
            ->where('u.username = ?',$username);
        echo    $query;
        exit;
        $user = $query->execute()->getFirst();

        //Authentication !
        $authexAdapter = new Application_Auth_exAdapter($user,$password);           
        $authResult = Zend_Auth::getInstance()->authenticate($authexAdapter);

        if(!$authResult->isValid()){
            $error_messages = $authResult->getMessages();
        } else {
            //sucess!

                    $this->_redirect('account/setup');

        }
    }
    $this->view->error_messages = $error_messages;
}    
嗯,是的


你有没有阅读过任何手册,或是遵循教程?看起来你甚至不知道发生了什么?

可能是
出口的副本肯定会阻止它在
echo$query之后显示任何内容行。