Esempio n. 1
0
 /**
  * 好友总数
  */
 public function countFriend($condition)
 {
     //得到条件语句
     $condition_str = $this->getCondition($condition);
     $count = Db::getCount('sns_friend', $condition_str);
     return $count;
 }
Esempio n. 2
0
 /**
  * 店铺的订单总数
  *
  */
 public function OrderCount($param)
 {
     $array = array();
     $condition_str = $this->getCondition($param);
     $ordercount = Db::getCount('order', $condition_str);
     return $ordercount;
 }
Esempio n. 3
0
 /**
  * 查看参与人数
  *
  */
 public function getWinAmount($activity_id)
 {
     $param = array();
     $param['activity_id'] = $activity_id;
     $param['is_win'] = 1;
     return Db::getCount('lottery_participant', $param);
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 /**
  * 总数
  *
  */
 public function getCount($condition)
 {
     $condition_str = $this->getCondition($condition);
     $count = Db::getCount('inform', $condition_str);
     return $count;
 }
Esempio n. 6
0
 /**
  * 取单个内容
  *
  * @param int $id ID
  * @return array 数组类型的返回结果
  */
 public function getCount()
 {
     return Db::getCount('mb_category');
 }
Esempio n. 7
0
 /**
  * 评论总数
  *
  * @param $condition 条件
  * @param $field 查询字段
  * @return array 数组格式的返回结果
  */
 public function getCommentCount($condition)
 {
     $condition_str = $this->getCondition($condition);
     return Db::getCount("sns_comment", $condition_str);
 }
Esempio n. 8
0
 /**
  * 查询会员总数
  */
 public function countMember($condition)
 {
     //得到条件语句
     $condition_str = $this->getCondition($condition);
     $count = Db::getCount('member', $condition_str);
     return $count;
 }
Esempio n. 9
0
 /**
  * 取单个内容
  *
  * @param int $id ID
  * @return array 数组类型的返回结果
  */
 public function getMbAdCount()
 {
     return Db::getCount('mb_ad');
 }
Esempio n. 10
0
 /**
  * 动态总数
  */
 public function countTrace($condition)
 {
     //得到条件语句
     $condition_str = $this->getCondition($condition);
     $count = Db::getCount('sns_tracelog', $condition_str);
     return $count;
 }
Esempio n. 11
0
 /**
  * 查询符合条件的商品评价总数
  */
 public function countGoodsEval($condition)
 {
     $condition_str = $this->getGoodsEvalCondition($condition);
     return Db::getCount('evaluate_goods', $condition_str);
 }
Esempio n. 12
0
 /**
  * 获取活动个数
  */
 public function getCount($id)
 {
     $condition = $this->getCondition($condition);
     return Db::getCount('activity', $condition);
 }