本文整理匯總了PHP中keke_table_class::updateself方法的典型用法代碼示例。如果您正苦於以下問題:PHP keke_table_class::updateself方法的具體用法?PHP keke_table_class::updateself怎麽用?PHP keke_table_class::updateself使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類keke_table_class
的用法示例。
在下文中一共展示了keke_table_class::updateself方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: exec_rate
public static function exec_rate($mark_status, $uid, $mark_cash, $model_code, $mark_type = '2')
{
$mark_type == 1 and $edit_col = "buyer_credit" or $edit_col = "seller_credit";
if ($model_code == 'preward' && floatval($mark_cash) < 1) {
$mark_value = 0;
} else {
$mark_value = self::get_mark_score($mark_type, $model_code, $mark_cash, $mark_status);
}
$mark_status == 1 and $seller_good_num = 1 or $seller_good_num = 0;
$credit_value = db_factory::get_count(sprintf("select %s from %switkey_space where uid = '%d'", $edit_col, TABLEPRE, $uid));
$mark_type == '2' and $level_role = '1' or $level_role = '2';
$user_levels = self::get_mark_level($credit_value + $mark_value, $level_role);
$user_level = serialize($user_levels);
if ($mark_type == 1) {
$space_array = array("buyer_credit" => "`buyer_credit` + {$mark_value}", "buyer_good_num" => "`buyer_good_num`+{$seller_good_num}", "buyer_total_num" => "`buyer_total_num`+1", "buyer_level" => "{$user_level}");
} elseif ($mark_type == 2) {
$space_array = array("seller_credit" => "`seller_credit`+ {$mark_value}", "seller_good_num" => "`seller_good_num` +{$seller_good_num}", "seller_total_num" => "`seller_total_num`+1", "seller_level" => "{$user_level}");
}
$wheresqlarr = array("uid" => $uid);
keke_table_class::updateself("witkey_space", $space_array, $wheresqlarr);
}