public function showAction()
{
$Tren = new Application_Model_DbTable_Tren();
$id = $this->getRequest()->getParam('tren_id');
$select = $Tren->select()->where('tren_id = ?', $id);
$this->view->tren = $Tren->fetchRow($select);
if (!$this->view->tren) {
throw new Zend_Controller_Action_Exception('Błąd', 404);
}
}
Listing 23.4. Metoda showAction() akcji index/show
Rozdział 23. Menu generowane na podstawie zawartości tabeli bazy danych