public function getRappelsCount() { return RappelTable::getInstance()->createQuery('r') ->select('COUNT(r.id_rappel)') ->where('r.id_agent = ?', $this->getLoggedUserId()) ->andWhere('r.cloture = ?', false) ->fetchOne(array(), Doctrine_Core::HYDRATE_SINGLE_SCALAR); }
public function executeIndex(sfWebRequest $request) { $this->rappels = RappelTable::getInstance()->createQuery('r') ->where('r.id_agent = ?', $this->getUser()->getLoggedUserId()) // ->andWhere('r.cloture = ?', false) ->orderBy('r.date_rappel ASC') ->execute(); }