本文整理汇总了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;
}