} elseif ($wahl == 'siege' OR $wahl == 'niederlagen' OR $wahl == 'unentschieden') {
$wahl_y = 'Elo';
} elseif ($wahl == 'siege' OR $wahl == 'niederlagen') {
$wahl_x= 'Siege';
$wahl_x= 'Siege';
$wahl_y= 'Niederlagen';
$wahl_y= 'Niederlagen';
$wahl_z= 'Unentschieden';
$wahl_z = 'Elo';
} elseif ($wahl == 'elo'){
$wahl_x= 'Siege';
$wahl_y= 'Niederlagen';
$wahl_z = 'Elo';
} else {
} else {
$wahl = 'siege';
$wahl = 'siege';
$wahl_x= 'Siege';
$wahl_x= 'Siege';
$wahl_y= 'Niederlagen';
$wahl_y= 'Niederlagen';
$wahl_z= 'Unentschieden';
$wahl_z = 'Elo';
}
}
$char_s = mysql_query('SELECT i.siege, i.leader, i.niederlagen, i.unentschieden, i.geld, i.clanname, i.id, u.nickname, (Select count(*) from user u1 where clan = i.id) as member, (Select 10 - count(*) from user u2 where clan = i.id and ((i.leader is null || i.leader != u2.id) and (i.co_leader is null ||i.co_leader != u2.id))) as freeslots, (select sum(spende) as summe from user_clan where clanid = i.id) as summe FROM clan i LEFT JOIN user u ON(i.leader=u.id) ORDER BY i.'.$wahl.' DESC LIMIT 50');
$sql = 'SELECT i.siege, i.leader, i.niederlagen, i.geld, i.clanname, i.id, u.nickname, (Select count(*) from user u1 where clan = i.id) as member, (Select 10 - count(*) from user u2 where clan = i.id and ((i.leader is null || i.leader != u2.id) and (i.co_leader is null ||i.co_leader != u2.id))) as freeslots, (select sum(spende) as summe from user_clan where clanid = i.id) as summe, elo FROM clan i LEFT JOIN user u ON(i.leader=u.id) ORDER BY i.'.$wahl.' DESC LIMIT 50';