當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。