From abe8222b1c46f56dbbe75aaf29aa98a6943b5efd Mon Sep 17 00:00:00 2001 From: hecht Date: Fri, 22 Sep 2017 15:58:07 +0000 Subject: [PATCH] fixed tournament bug --- ag/include/tournament.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ag/include/tournament.inc.php b/ag/include/tournament.inc.php index 2b4a768..a0cade8 100644 --- a/ag/include/tournament.inc.php +++ b/ag/include/tournament.inc.php @@ -145,8 +145,9 @@ function retrieveParticipants($tournament_type) { $cid = array(); 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; + // echo '

'.$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']; } $sql = 'DELETE FROM tournament_registration WHERE type = '.$tournament_type['id']; @@ -174,7 +175,6 @@ function retrieveParticipants($tournament_type) { // echo $sql.'
'; $char_array = array(); foreach ($cid as $char_id) { - $qry = db_query($sql); // echo $row['id'].'
'; if($itemless == 1) { $char_array[] = getChar($char_id); // ohne Equip für Turniere!!