$max_charakter = mysql_num_rows(mysql_query('SELECT id FROM chars WHERE rasse NOT IN ('.implode(',', $exclude_race_ids).') LIMIT 250'));
$max_charakter = mysql_num_rows(db_query('SELECT id FROM chars WHERE rasse NOT IN ('.implode(',', $exclude_race_ids).') LIMIT 250'));
if($max_charakter<250){
if($max_charakter<250){
echo "Not enough chars ($max_charakter)";
exit;
exit;
}
}
$charakter = mysql_query('SELECT name, id FROM chars WHERE rasse NOT IN '.implode(',', $exclude_race_ids).' ORDER BY level DESC LIMIT '.$max_charakter);
$charakter = db_query('SELECT name, id FROM chars WHERE rasse NOT IN('.implode(',', $exclude_race_ids).') ORDER BY level DESC LIMIT '.$max_charakter);
$charakter = mysql_query('SELECT name, id FROM chars WHERE rasse NOT IN '.implode(',', $exclude_race_ids).' ORDER BY level DESC LIMIT '.$max_charakter);
$charakter = mysql_query('SELECT name, id FROM chars WHERE rasse NOT IN ('.implode(',', $exclude_race_ids).') ORDER BY level DESC LIMIT '.$max_charakter);