raise statistics about wins and defeats

main
hecht 13 years ago
parent a20157a1f9
commit 64ed0c4259

@ -85,7 +85,14 @@ if(!semaphoreUP($ressource)) {
// echo $sql . '<br>';
mysql_query($sql);
addClanExp($clan1['id'], $expClan1);
mysql_query('UPDATE clan SET elo = elo + ' .$eloClan1 . ' WHERE id = ' . $clan1['id']);
$appendum = null;
if($winner == $clan1['id']) {
$appendum = ', siege = siege + 1';
} else {
$appendum = ', niederlagen = niederlagen + 1';
}
mysql_query('UPDATE clan SET elo = elo + ' .$eloClan1 . $appendum . ' WHERE id = ' . $clan1['id']);
}
if($_clan_data2['elo_change'] == null) {
@ -93,7 +100,15 @@ if(!semaphoreUP($ressource)) {
// echo $sql . '<br>';
mysql_query($sql);
addClanExp($clan2['id'], $expClan1);
mysql_query('UPDATE clan SET elo = elo + ' .$eloClan2 . ' WHERE id = ' . $clan2['id']);
$appendum = null;
if($winner == $clan2['id']) {
$appendum = ', siege = siege + 1';
} else {
$appendum = ', niederlagen = niederlagen + 1';
}
mysql_query('UPDATE clan SET elo = elo + ' .$eloClan2 . $appendum . ' WHERE id = ' . $clan2['id']);
}
}
semaphoreDown($ressource);

Loading…
Cancel
Save