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