/** * 好友总数 */ public function countFriend($condition) { //得到条件语句 $condition_str = $this->getCondition($condition); $count = Db::getCount('sns_friend', $condition_str); return $count; }
/** * 店铺的订单总数 * */ public function OrderCount($param) { $array = array(); $condition_str = $this->getCondition($param); $ordercount = Db::getCount('order', $condition_str); return $ordercount; }
/** * 查看参与人数 * */ public function getWinAmount($activity_id) { $param = array(); $param['activity_id'] = $activity_id; $param['is_win'] = 1; return Db::getCount('lottery_participant', $param); }
public function msgTypeCount($condition) { $types = $condition['message_type_in']; $array = explode(',', $types); $msgTypeCount = array(); foreach ($array as $value) { $condition['message_type_in'] = null; $condition['message_type'] = $value; $condition_str = $this->getCondition($condition); $msgTypeCount[$this->msgType[$value]] = intval(Db::getCount('message', $condition_str)); } return $msgTypeCount; }
/** * 总数 * */ public function getCount($condition) { $condition_str = $this->getCondition($condition); $count = Db::getCount('inform', $condition_str); return $count; }
/** * 取单个内容 * * @param int $id ID * @return array 数组类型的返回结果 */ public function getCount() { return Db::getCount('mb_category'); }
/** * 评论总数 * * @param $condition 条件 * @param $field 查询字段 * @return array 数组格式的返回结果 */ public function getCommentCount($condition) { $condition_str = $this->getCondition($condition); return Db::getCount("sns_comment", $condition_str); }
/** * 查询会员总数 */ public function countMember($condition) { //得到条件语句 $condition_str = $this->getCondition($condition); $count = Db::getCount('member', $condition_str); return $count; }
/** * 取单个内容 * * @param int $id ID * @return array 数组类型的返回结果 */ public function getMbAdCount() { return Db::getCount('mb_ad'); }
/** * 动态总数 */ public function countTrace($condition) { //得到条件语句 $condition_str = $this->getCondition($condition); $count = Db::getCount('sns_tracelog', $condition_str); return $count; }
/** * 查询符合条件的商品评价总数 */ public function countGoodsEval($condition) { $condition_str = $this->getGoodsEvalCondition($condition); return Db::getCount('evaluate_goods', $condition_str); }
/** * 获取活动个数 */ public function getCount($id) { $condition = $this->getCondition($condition); return Db::getCount('activity', $condition); }