打开include/global.func.php
找到:
- function updatecredits($uids, $creditsarray, $coef = 1, $extrasql = '') {
- if($uids && ((!empty($creditsarray) && is_array($creditsarray)) || $extrasql)) {
- global $db, $tablepre;
- $creditsadd = $comma = '';
- foreach($creditsarray as $id => $addcredits) {
- $creditsadd .= $comma.'extcredits'.$id.'=extcredits'.$id.'+('.intval($addcredits).')*('.$coef.')';
- $comma = ', ';
- }
- if($creditsadd || $extrasql) {
- $db->query("UPDATE {$tablepre}members SET $creditsadd ".($creditsadd && $extrasql ? ', ' : '')." $extrasql WHERE uid IN ('$uids')", 'UNBUFFERED');
- }
- }
- }
复制代码
相信你已经发现那个intval了~ |