本文整理匯總了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);
}