2009年10月4日星期日

[fw-db] Fatal error: Uncaught exception 'Zend_Db_Exception' with message 'Adapter name must be specified in a string'

Fatal error: Uncaught exception 'Zend_Db_Exception' with message 'Adapter name must be specified in a string'

I've been googling this problem but can't find any hints to follow.  Can somebody help me fix this Error?
The code that is causing this error is this:


Bootstrap

    protected function _initRegDatabase()
    {
    $config = Zend_Registry::get('config');
       
        $db = Zend_Db::factory($config->db);                            //   This line seems to cause the Error!
        Zend_Db_Table_Abstract::setDefaultAdapter($db);
        Zend_Registry::set('db', $db);
    }


/apprentice

没有评论: