当前位置: 首页>>代码示例>>PHP>>正文


PHP CActiveRecord::count方法代码示例

本文整理汇总了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);
 }
开发者ID:anastaszor,项目名称:yii1-recorditerator,代码行数:12,代码来源:CRecordIterator.php

示例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);
 }
开发者ID:anastaszor,项目名称:yii1-recorditerator,代码行数:13,代码来源:COrderedIterator.php

示例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);
 }
开发者ID:anastaszor,项目名称:yii1-recorditerator,代码行数:14,代码来源:CTimedOrderedIterator.php

示例4: getCount

 /**
  * {@inheritDoc}
  * @see IExportPolicy::getCount()
  */
 public function getCount(CDbCriteriaBuilder $builder)
 {
     return $this->_record->count($builder->getCriteria());
 }
开发者ID:anastaszor,项目名称:yii1-export,代码行数:8,代码来源:AbstractExportPolicy.php

示例5: count

 public function count($condition = '', $params = array())
 {
     $result = parent::count($this->prepareCondition($condition), $params);
     $this->removeFindEavRelation();
     return $result;
 }
开发者ID:kuzmina-mariya,项目名称:unizaro-spa,代码行数:6,代码来源:EavActiveRecord.php


注:本文中的CActiveRecord::count方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。