zend framework - How to PASS your own mysql connection to Zend_DB? -
I have my own mysql_connect ... etc. As long as I want to use Zend Framework specifically with Zend_DB ZEND connection to use as an adapter? Like
$ myconn = mysql_connect ('... blab', blah etc ...) Zend_DB_table :: setAdapter ($ myconn);
Do not connect yourself to the DB, but use the factory
$ db = Zend_Db :: factory ('Pdo_Mysql', array ('host' = & gt; '127.0.0.1', 'username' => 'webviewer', 'password' = & Gt; 'Xxxxxxxx', 'dbname' = & gt; 'test'));
In this way you can connect to DB, but only once you are connected you will need connection and will be suited for display like this ...
Comments
Post a Comment