ZF retreive db connection in controller


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $db = Zend_Db_Table::getDefaultAdapter();
  2. $db->getConnection();
  3.  
  4. Zend_Debug::dump($db->fetchAll("SELECT * FROM users"));

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.