dimanche 14 octobre 2012

Zend : FetchAssoc in MVC Zend_Db_Table

class Matrice extends Zend_DB_Table {
   
    public function listeMatrice() {
       
          $db = $this->getDefaultAdapter();
          $db->setFetchMode(Zend_Db::FETCH_ASSOC);
          $query  = "select m.id, c.nom, e.alias, m.comment, m.display
                     from matrice m, couloir c, environnement e
                     where c.id=m.id_couloir and e.id=m.id_env
                     group by id_couloir, id_env
                     order by id_couloir, id_env";
         
            return $db->fetchAssoc($query);
       
    }
}

Aucun commentaire:

Enregistrer un commentaire