/** * 记录数. */ public function count($filter = null) { if ($filter['node_id'] > 0) { $filter['node_id'] = app::get('content')->model('article_nodes')->get_childrens_id($filter['node_id']); } return parent::count($filter); }
/** * 获得专辑列表 * * @param array $param 参数 * @return array */ function getSpecialList($param = array()) { $list = array(); $filter = $param['filter']; $fields = $param['fields'] ? $param['fields'] : '*'; $limit = intval($param['limit']); $limit = $limit > 0 ? $limit : 20; $page = intval($param['page']); $page = $page > 0 ? $page : 1; $offset = ($page - 1) * $limit; $orderby = $param['orderby'] ? $param['orderby'] : 'addtime DESC'; $count = parent::count($filter); if ($count) { $info = parent::getList($fields, $filter, $offset, $limit, $orderby); } $platform = $param['platform'] ? $param['platform'] : 'wap'; // 获得商品列表 if ($info) { $list['total_results'] = $count; foreach ($info as $k => $v) { $param = array('special_id' => $v['special_id'], 'limit' => 4, 'platform' => $platform); $list['list'][] = $this->getSpecialInfo($param, 2); } } return $list; }
function count($filter = array()) { if ($this->type == 'msgtoadmin') { $this->type = 'msg'; $this->falg = 'msgtoadmin'; $filter['to_id'] = 1; } if ($this->type) { $filter['object_type'] = $this->type; } if ($filter['for_comment_id'] === 'all') { unset($filter['for_comment_id']); } else { $filter['for_comment_id'] = $filter['for_comment_id'] ? $filter['for_comment_id'] : 0; } return parent::count($filter); }
function check_tag($item) { return parent::count(array('tag_name' => $item['tag_name'], 'tag_type' => $item['tag_type'], 'app_id' => $item['app_id'])); }
function get_subcat_count($cat_id) { $filter = array('parent_id' => $cat_id); return parent::count($filter); }
public function count($filter = array()) { if ($tmp['member_id'] == '-1') { $arr = $_SESSION['b2c_cart_objects'][$tmp['member_ident']]; $arr = $this->filter_getlist($arr, $filter); } else { if ($this->use_kv()) { //使用kv $this->kv_instance()->fetch($this->kv_prefix, $arr); $arr = $this->filter_getlist($arr, $filter); } else { //使用database return parent::count($filter); } } return $arr ? count($arr) : 0; }
public function pcount($filter = array()) { return parent::count($filter); }
function parent_count($filter = null) { return parent::count($filter); }