Skip to content
Extraits de code Groupes Projets
Valider f65ef6d7 rédigé par Okhin's avatar Okhin
Parcourir les fichiers

Casting to int

parent 50a0b08e
Branches
Étiquettes
2 requêtes de fusion!78Preprod,!77Resolve "Souci sur solde des donateurs"
......@@ -106,7 +106,7 @@ class UserHandler
"SELECT sum(IF(quoi = 'hoopie',250,0)) + sum(IF(quoi = 'pishirt', 100, 0)) + sum(IF(quoi = 'pibag', 50, 0)) + sum(IF(quoi = 'piplome', 30, 0)) AS spent FROM contreparties WHERE user_id = :user_id",
[ 'user_id' => $user_id]
)->fetchColumn();
$this->connection->executeUpdate('UPDATE users SET total = :total, cumul = :cumul WHERE id = :user_id', ['total' => $total, 'cumul' => $total - $spent, 'user_id' => $user_id]);
$this->connection->executeUpdate('UPDATE users SET total = :total, cumul = :cumul WHERE id = :user_id', ['total' => (int) $total, 'cumul' => (int) $total - (int) $spent, 'user_id' => $user_id]);
}
}
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter