Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_once 'Zend/Registry.php';
- require_once 'Zend/Db/Adapter/Pdo/Mysql.php';
- // Set the database connection information
- $params = array('host' =>'localhost',
- 'username' =>'root',
- 'password' =>'12345',
- 'dbname' =>'testdb');
- // Assign the database connection to the registry
- $db = new Zend_Db_Adapter_Pdo_Mysql($params);
- $db->setFetchMode(Zend_Db::FETCH_OBJ);
- Zend_Registry::set('db',$db);
- resources.db.adapter = "pdo_mysql"
- resources.db.params.host = "localhost"
- resources.db.params.username = "root"
- resources.db.params.password = "12345"
- resources.db.params.dbname = "testdb"
- $this->bootstrap('db');
- $db = Zend_Db_Table::getDefaultAdapter();
Add Comment
Please, Sign In to add comment