Tengo una pregunta. Tengo el siguiente modelo.
Código PHP:
<?php
class Application_Model_DbTable_Projects extends Zend_Db_Table_Abstract{
protected $_name = 'projects';
public function listProject($id){
$select = $this->select()
->from(array('p' => 'projects'))
->join(array('pm' => 'permissions'),'p.Id_Permission = pm.Id_Permission', array())
->join(array('l' => 'languages'), 'p.Id_Language = l.Id_Language',array())
->where('p.Id_User_Project = '.(int)$id)
->where('p.State_Project = 1')
->where('pm.State_Permission = 1')
->where('l.State_Language = 1');
return parent::fetchAll($select);
}
public function AddProject(){
}
}
Código PHP:
[_data:protected] => Array
(
[0] => Array
(
[Id_Project] => 1
[Id_User_Project] => 1
[Name_Project] => New Project
[Description] => Project etc.....
[Id_Language] => 1
[Id_Permission] => 1
[State_Project] => 1
)
[1] => Array
(
[Id_Project] => 2
[Id_User_Project] => 1
[Name_Project] => New Project 2
[Description] => Otro Proyectp
[Id_Language] => 1
[Id_Permission] => 1
[State_Project] => 1
)
)