本文整理匯總了PHP中Base_model::count方法的典型用法代碼示例。如果您正苦於以下問題:PHP Base_model::count方法的具體用法?PHP Base_model::count怎麽用?PHP Base_model::count使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Base_model
的用法示例。
在下文中一共展示了Base_model::count方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: count_all_lang_list
public function count_all_lang_list($where = array())
{
$this->{$this->db_group}->distinct();
$this->{$this->db_group}->join($this->lang_table, $this->lang_table . '.id_' . $this->table . ' = ' . $this->table . '.id_' . $this->table, 'inner');
$this->{$this->db_group}->join($this->url_table . ' as url', $this->table . '.id_article = url.id_entity AND ' . '(' . 'url.active = 1 AND ' . "url.type = 'article' AND " . 'url.lang = ' . $this->lang_table . '.lang' . ')', 'left');
$this->{$this->db_group}->join('page_article', $this->table . '.id_article = page_article.id_article', 'left');
$this->{$this->db_group}->join('page', 'page.id_page = page_article.id_page', 'left');
$this->{$this->db_group}->join('page_lang', 'page_lang.id_page = page.id_page AND article_lang.lang = page_lang.lang', 'left');
$nb = parent::count($where);
return $nb;
}
示例2: count
/**
* @param array $where
*
* @return int
*/
public function count($where = array())
{
unset($where['limit']);
unset($where['offset']);
$this->_join_role();
$nb = parent::count($where);
return $nb;
}