예제 #1
0
 public function getTotalEntries()
 {
     $select = $this->dbService->select();
     /* @var $select Zend_Db_Select */
     $select->from('trackerentry', new Zend_Db_Expr("count(*) as total"));
     $count = $this->dbService->fetchOne($select);
     return $count;
 }
예제 #2
0
 /**
  * Get the total number of clients for a given where clause
  *
  * @param array $where
  * @return int
  */
 public function getClientCount($where)
 {
     $select = $this->dbService->select();
     $select->from('client', new Zend_Db_Expr('count(*) as total'));
     foreach ($where as $field => $value) {
         $select->where($field . ' ?', $value);
     }
     $select->where('deleted=?', 0);
     $count = $this->dbService->fetchOne($select);
     return $count;
 }