select()->where('dateCommande LIKE ?', $dateDebut.'%'); if (!empty($etat)){ $sql->where('statutCommande = ?', $etat); } if (!empty($mode) && $mode != '-'){ $sql->where('type = ?', $mode); } $sql->order('dateCommande ASC'); $this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ); $result = $this->getAdapter()->fetchAll($sql); return $result; } public function getCommandesKbisById($id) { $sql = $this->select() ->where('id = ?', $id); $this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ); $result = $this->getAdapter()->fetchAll($sql); return $result; } public function getCommandesKbisBySiren($siren) { $sql = $this->select() ->where('siren = ?', $siren) ->order('dateCommande ASC'); $this->getAdapter()->setFetchMode(Zend_Db::FETCH_OBJ); $result = $this->getAdapter()->fetchAll($sql); return $result; } }