if you are using Zend_Controller_Front as I am you can set it as a parameter:

$frontController = Zend_Controller_Front::getInstance();
$frontController->setParam('db', $db)

and then in your controller:

$this->getFrontController()->getParam('db')

So many ways to skin a cat.

Jim


Joseph Crawford wrote:
> 
> In my index.php bootstrap file I setup the database connection into a  
> variable $db.  Now I need to access this in other controllers.  This  
> seems like a dumb question to me but do I need to global $db; before I  
> can access it in the indexAction method of the controller or is it in  
> the global scope by default?
> 
> Thanks,
> Joseph Crawford
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dumb-Question-tp17253025p17254165.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to