library/Garp/Browsebox.php
protected function _fetchMaxChunks() {
        $count = 'COUNT(*)';
        $model = $this->getModel();
        $select = clone $this->getSelect();
        $select->reset(Zend_Db_Select::COLUMNS)
               ->reset(Zend_Db_Select::FROM)
               ->reset(Zend_Db_Select::ORDER)
               ->reset(Zend_Db_Select::GROUP)
        ;
        $select->from($model->getName(), array('c' => $count));

        if ($max = $this->_fetchMaxChunksFromFilters($select)) {
            return $max;
        } else {
            $result = $model->fetchRow($select);
            return $result->c;
        }
    }
protected function _fetchMaxChunks() {
        $count = 'COUNT(*)';
        $model = $this->getModel();
        $select = clone $this->getSelect();
        $select->reset(Zend_Db_Select::COLUMNS)
               ->reset(Zend_Db_Select::FROM)
               ->reset(Zend_Db_Select::ORDER)
               ->reset(Zend_Db_Select::GROUP)
        ;
        $select->from($model->getName(), array('c' => $count));

        if ($max = $this->_fetchMaxChunksFromFilters($select)) {
            return $max;
        } else {
            $result = $model->fetchRow($select);
            return $result->c;
        }
    }
protected function _fetchMaxChunks ( ) { $ count = 'COUNT(*)' ; $ model = $ this -> getModel ( ) ; $ select = clone $ this -> getSelect ( ) ; $ select -> reset ( Zend_Db_Select :: COLUMNS ) -> reset ( Zend_Db_Select :: FROM ) -> reset ( Zend_Db_Select :: ORDER ) -> reset ( Zend_Db_Select :: GROUP ) ; $ select -> from ( $ model -> getName ( ) , array ( 'c' => $ count ) ) ; if ( $ max = $ this -> _fetchMaxChunksFromFilters ( $ select ) ) { return $ max ; } else { $ result = $ model -> fetchRow ( $ select ) ; return $ result -> c ; } }
Determine what the max amount of chunks is for the given conditions.
@return Int
Determine what the max amount of chunks is for the given conditions .