public function indexAction() { $noticias = new Application_Model_DbTable_Noticias(); $select = $noticias->select(); $select->order('idNoticias desc'); $this->view->resultado = $noticias->fetchAll($select); }
public function exibenoticiaAction() { $request = $this->getRequest(); // $user = Zend_Registry::get('zend_auth_user'); $noticia = new Application_Model_DbTable_Noticias(); $select = $noticia->select(); $resultado = $select->where('idNoticias = ?', $request->getParam('noticia'))->limit(1); $this->view->noticia = $noticia->fetchall($resultado); }