本文整理匯總了PHP中CActiveRecord::count方法的典型用法代碼示例。如果您正苦於以下問題:PHP CActiveRecord::count方法的具體用法?PHP CActiveRecord::count怎麽用?PHP CActiveRecord::count使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CActiveRecord
的用法示例。
在下文中一共展示了CActiveRecord::count方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: rewind
/**
* {@inheritDoc}
* @see Iterator::rewind()
*/
public function rewind()
{
$this->_current_index = 0;
$this->_criteria->offset = 0;
$this->_max_count = (int) $this->_model->count($this->_criteria);
$this->_current_records = $this->_model->findAll($this->_criteria);
$this->_current_records_size = count($this->_current_records);
}
示例2: rewind
/**
* {@inheritDoc}
* @see Iterator::rewind()
*/
public function rewind()
{
$this->_current_index = 0;
$this->_current_offset = 0;
$this->_max_count = $this->_model->count($this->_criteria);
$newcriteria = clone $this->_criteria;
$this->_current_records = $this->_model->findAll($newcriteria);
$this->_current_records_size = count($this->_current_records);
}
示例3: rewind
/**
* {@inheritDoc}
* @see Iterator::rewind()
*/
public function rewind()
{
$this->_current_index = 0;
$this->_current_offset = 0;
$timedCriteria = clone $this->_criteria;
$timedCriteria->compare($this->_date_field, $this->_date_value);
$this->_max_count = $this->_model->count($timedCriteria);
$this->_current_records = $this->_model->findAll($timedCriteria);
$this->_current_records_size = count($this->_current_records);
}
示例4: getCount
/**
* {@inheritDoc}
* @see IExportPolicy::getCount()
*/
public function getCount(CDbCriteriaBuilder $builder)
{
return $this->_record->count($builder->getCriteria());
}
示例5: count
public function count($condition = '', $params = array())
{
$result = parent::count($this->prepareCondition($condition), $params);
$this->removeFindEavRelation();
return $result;
}