예제 #1
0
파일: Dao.php 프로젝트: eryx/labs
 public function getCount($where)
 {
     $db = $this->getAdapter();
     $select = $db->select();
     $cols = $this->_getCols();
     $select->from($this->_name, 'count(*) as count');
     Core_Dao::buildSelectWhere($select, $where);
     try {
         $rs = $db->fetchRow($select);
     } catch (Exception $e) {
         throw $e;
     }
     return (int) $rs['count'];
 }