Skip to content
Snippets Groups Projects
Commit bac24af1 authored by LAMINO-HARO FERNANDO-JOEL's avatar LAMINO-HARO FERNANDO-JOEL
Browse files

Merge branch 'AjoutAvatar' into 'dev'

Update de inGame when playing

See merge request !75
parents bad81b92 741742b5
Branches
Tags
1 merge request!75Update de inGame when playing
......@@ -54,14 +54,14 @@ if($dataString) // on verifie si $dataString n'est pas vide
// Mise à jour du score du joueur
if ($rang == 1) {
$sql = "UPDATE Joueur SET score = GREATEST(score + :score, 0), nbMatch = nbMatch + 1, nbVictoire = nbVictoire + 1 WHERE id_joueur=:id";
$sql = "UPDATE Joueur SET score = GREATEST(score + :score, 0), nbMatch = nbMatch + 1, nbVictoire = nbVictoire + 1,inGame = 0 WHERE id_joueur=:id";
$stmt = $pdo->prepare($sql);
$stmt->bindParam(':score', $score);
$stmt->bindParam(':id', $id_joueur);
$stmt->execute();
}
else{
$sql = "UPDATE Joueur SET score = GREATEST(score + :score, 0), nbMatch = nbMatch + 1,nbDefaite = nbDefaite + 1 WHERE id_joueur=:id";
$sql = "UPDATE Joueur SET score = GREATEST(score + :score, 0), nbMatch = nbMatch + 1,nbDefaite = nbDefaite + 1,inGame = 0 WHERE id_joueur=:id";
$stmt = $pdo->prepare($sql);
$stmt->bindParam(':score', $score);
$stmt->bindParam(':id', $id_joueur);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment