I am building a zend framework web app around the mysql sakila db. I have been able to display the basic films table details in a films view. this table contains among other columns, a 'language_id' and an 'original_language_id' columns that reference a language table. I have set up the table relationships correctly in my models. I am not sure how to display the language (not the id's) in my films view - how and where do I use the model relationships to display the langauge names in my view? at the controller level? here's part of my films controller:
class FilmsController extends Zend_Controller_Action
{
public function indexAction()
{
$this->view->title = 'Films';
$this->view->headTitle($this->view->title);
$films = new Application_Model_DbTable_Films();
$this->view->films = $films->fetchAll();
here's part of the view where I show the table
<td><?php echo $this->escape($film->title);?></td>
<td><?php echo $this->escape($film->description);?></td>
<td><?php echo $this->escape($film->release_year);?></td>
<td><?php echo $this->escape($film->language_id);?></td>
. . .