私は使おうとしています
$db = Zend_Db_Table::getDefaultAdapter();
しかし、それはNULLを返します
追加してみました
resources.db.isDefaultTableAdapter = true
私のapplication.iniでは、まったく変更はありません...
あなたの助けを前もって感謝します
私は使おうとしています
$db = Zend_Db_Table::getDefaultAdapter();
しかし、それはNULLを返します
追加してみました
resources.db.isDefaultTableAdapter = true
私のapplication.iniでは、まったく変更はありません...
あなたの助けを前もって感謝します
次の関数を Bootstrap に追加する必要があります
protected function _initDatabase() {
$db = $this->getPluginResource('db')->getDbAdapter();
Zend_Db_Table::setDefaultAdapter($db); //important
Zend_Registry::set('db', $db);
}
これを追加してみてください
SetEnv APPLICATION_ENV development
ファイル PROJECTNAME\public\.htaccess の最後に