fixed tournament bug

main
hecht 7 years ago
parent f65cc8da78
commit abe8222b1c

@ -145,8 +145,9 @@ function retrieveParticipants($tournament_type) {
$cid = array(); $cid = array();
if($gain == TOURNAMENT_GAIN_ANMELDUNG){ if($gain == TOURNAMENT_GAIN_ANMELDUNG){
$sql = 'SELECT c.id FROM tournament_registration tr inner join chars as c ON tr.charakter = c.id WHERE tr.type='.$tournament_type['id'].' AND '.$filter_sql; $sql = 'SELECT c.id FROM tournament_registration tr inner join chars as c ON tr.charakter = c.id WHERE tr.type='.$tournament_type['id'].' AND '.$filter_sql;
// echo '<p>'.$sql.'</p>';
$qry = db_query($sql); $qry = db_query($sql);
while($row = mysqli_fetch_assoc($qry) && count($cid) < $anzahl){ while (($row = mysqli_fetch_assoc($qry)) && count($cid) < $anzahl){
$cid[] = $row['id']; $cid[] = $row['id'];
} }
$sql = 'DELETE FROM tournament_registration WHERE type = '.$tournament_type['id']; $sql = 'DELETE FROM tournament_registration WHERE type = '.$tournament_type['id'];
@ -174,7 +175,6 @@ function retrieveParticipants($tournament_type) {
// echo $sql.'<br>'; // echo $sql.'<br>';
$char_array = array(); $char_array = array();
foreach ($cid as $char_id) { foreach ($cid as $char_id) {
$qry = db_query($sql);
// echo $row['id'].'<br>'; // echo $row['id'].'<br>';
if($itemless == 1) { if($itemless == 1) {
$char_array[] = getChar($char_id); // ohne Equip für Turniere!! $char_array[] = getChar($char_id); // ohne Equip für Turniere!!

Loading…
Cancel
Save