wimg schrieb:
This is in my bootstrap index.php :
$db = Zend_Db::factory('PDO_MYSQL',$params);
Zend::register('db',$db);
Zend_Db_Table::setDefaultAdapter($db);

Yet it doesn't work. I can't automatically access find, quoteIn or other
functions, nor can I do :
$db=$this->getAdapter();
as that returns NULL

getAdapter() simply returns $this->_connection which is initially set to null unless one of the methods calls _connect(). _connect() isn't public, so you can't call it explicit. Not establishing the connection immediately is intended. The connection will be established as late as possible. Too late in this case and for some other cases. See i.e. the workaround in http://framework.zend.com/issues/browse/ZF-147


Gunar

Reply via email to