Public snipts »
robertbanh's
snipts » zend
showing 1-3 of 3 snipts for zend
-
∞ Correct way to do Pagination in Zend
<? //In other words, instead of this: $select= $this->db->select()->from( 'runz_miles', 'EMPL_NO')->where('empl_no = ?', 31713); $this->view->result = $this->db->fetchAll($sql); $paginator = Zend_Paginator::factory($this->view->result); //Do this: $select= $this->db->select()->from( 'runz_miles', 'EMPL_NO')->where('empl_no = ?', 31713); $paginator = Zend_Paginator::factory($select);
-
∞ Zend: Get controller and action in Controller
<? // zend [debugging] // this will get the controller and action // on the controller: var_export($this->getRequest()); die(); echo $this->getRequest()->getParam('module'); echo $this->getRequest()->getParam('controller'); echo $this->getRequest()->getParam('action');
-
∞ Zend: Using URL helper inside a View Helper Method
<? //Using URL helper inside a View Helper Method $link = $this->view->url(array( 'module'=>'default', 'controller'=>'con', 'action'=>'details', 'f'=>'search', 'id'=>$id, ), '', true);



Programming PHP