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