本文整理汇总了PHP中Db::getCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Db::getCount方法的具体用法?PHP Db::getCount怎么用?PHP Db::getCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Db
的用法示例。
在下文中一共展示了Db::getCount方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: countFriend
/**
* 好友总数
*/
public function countFriend($condition)
{
//得到条件语句
$condition_str = $this->getCondition($condition);
$count = Db::getCount('sns_friend', $condition_str);
return $count;
}
示例2: OrderCount
/**
* 店铺的订单总数
*
*/
public function OrderCount($param)
{
$array = array();
$condition_str = $this->getCondition($param);
$ordercount = Db::getCount('order', $condition_str);
return $ordercount;
}
示例3: getWinAmount
/**
* 查看参与人数
*
*/
public function getWinAmount($activity_id)
{
$param = array();
$param['activity_id'] = $activity_id;
$param['is_win'] = 1;
return Db::getCount('lottery_participant', $param);
}
示例4: msgTypeCount
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;
}
示例5: getCount
/**
* 总数
*
*/
public function getCount($condition)
{
$condition_str = $this->getCondition($condition);
$count = Db::getCount('inform', $condition_str);
return $count;
}
示例6: getCount
/**
* 取单个内容
*
* @param int $id ID
* @return array 数组类型的返回结果
*/
public function getCount()
{
return Db::getCount('mb_category');
}
示例7: getCommentCount
/**
* 评论总数
*
* @param $condition 条件
* @param $field 查询字段
* @return array 数组格式的返回结果
*/
public function getCommentCount($condition)
{
$condition_str = $this->getCondition($condition);
return Db::getCount("sns_comment", $condition_str);
}
示例8: countMember
/**
* 查询会员总数
*/
public function countMember($condition)
{
//得到条件语句
$condition_str = $this->getCondition($condition);
$count = Db::getCount('member', $condition_str);
return $count;
}
示例9: getMbAdCount
/**
* 取单个内容
*
* @param int $id ID
* @return array 数组类型的返回结果
*/
public function getMbAdCount()
{
return Db::getCount('mb_ad');
}
示例10: countTrace
/**
* 动态总数
*/
public function countTrace($condition)
{
//得到条件语句
$condition_str = $this->getCondition($condition);
$count = Db::getCount('sns_tracelog', $condition_str);
return $count;
}
示例11: countGoodsEval
/**
* 查询符合条件的商品评价总数
*/
public function countGoodsEval($condition)
{
$condition_str = $this->getGoodsEvalCondition($condition);
return Db::getCount('evaluate_goods', $condition_str);
}
示例12: getCount
/**
* 获取活动个数
*/
public function getCount($id)
{
$condition = $this->getCondition($condition);
return Db::getCount('activity', $condition);
}