Hey Tom,
I set a default db adapter on the DB_Table class,
in bootstrap - 
 Zend_Db_Table_Abstract::setDefaultAdapter($db);
and then whenever i need to access the db adapter 
 Zend_Db_Table_Abstract::getDefaultAdapter($db);



-----Original Message-----
From: Tom Printy [mailto:[EMAIL PROTECTED]
Sent: Sun 29/06/2008 05:35
To: [email protected]
Subject: [fw-general] DB connection params
 
Hello,

I am just starting with the Zend framework. I am using the MVC
fucntionality and would like to know the best practice for configuring
and using DB connection paramaters.  I don't think I want to this in
every function that connects to a db. 

params = array(
                'host' => 'localhost',
                'username' => 'postgres',
                'password' => '',
                'dbname' => ''
                );
        
                $DB = Zend_Db::factory('pdo_pgsql', $params);



Thanks
-Tom Printy


Reply via email to