Verfasst: 04.06.2008 22:30
für mich leider noch nicht ^^ ich stehe immer noch ohne Rangliste da ^^
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
ja, alternativ kannst du aber über den mySQLAdmin dem tatsächlichen Torschützenkönig vor dem eintragen des Finals seine erzielten Tore eintragen.wwwthomasbauerattf hat geschrieben: was ist wenn kein spieler den richtigen torschützenkönig tippt?
im acp kann man ja bei jedem spieler der von mind. 1 spieler als favorit gewählt wurde, die anzahl der tore eingeben...
was ist wenn keinerr den richtigen wählt, gewinnt dann der user von dem der spieler am nähesten dran war?
wa müssen wir da machen?Patch hat Folgendes geschrieben:
ihr werdet aber beim eintragen des letzten spiels ebenfalls probleme bekommen. da ist noch folgende kritische zeile zur ermittlung der torjägerpunkte
Code:
$sql = "SELECT userid from phpbb_em_torschuetzen_user u inner join phpbb_em_torschuetzen t on t.spielerid = u.spielerid where userid = (select tipp_user from phpbb_em_tipps where tipp_id = " . $em_tipps[$current_game_id][$u]['tipp_id'] . ") and tore = (Select max(tore) from phpbb_em_torschuetzen)";
Alle anderen sollten hier auch nochmal nachbessern. hier sind die tabellennamen hardcodiert drin!
weiss hier jemand was das sein könnte?fluidman hat geschrieben:Huch, mir ist grad noch was aufgefallen.. in der em_usertipps.php bekomme ich folgenden Fehler bei normalen usern (nicht admins):
das ist Zeile 282:Code: Alles auswählen
Warning: Division by zero in /var/www/s15u20/html/emtipp/em_usertipps.php on line 282
tips?$int_faktortips = round($int_maxbar/(max($arr_userpkt[0], $arr_userpkt[1], $arr_userpkt[2], $arr_userpkt[3], $arr_userpkt[4])/64));
Code: Alles auswählen
$int_userpkt = -1;
$int_userpos = 0;
$sql = "SELECT A.tipp_user , sum( A.tipp_points ) AS user_points, count( A.tipp_points ) AS user_total_tipps, count(
B.tipp_points ) AS user_points_tendency, count( C.tipp_points ) AS user_points_difference, count( D.tipp_points ) AS user_points_result
FROM " . EM_TIPPS_TABLE . " A
LEFT JOIN " . EM_TIPPS_TABLE . " B ON A.tipp_id = B.tipp_id
AND A.tipp_points = " . $em_config['points_tendency'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " C ON A.tipp_id = C.tipp_id
AND A.tipp_points = " . $em_config['points_tordiff'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " D ON A.tipp_id = D.tipp_id
AND A.tipp_points = " . $em_config['points_match'] . "
inner join (Select game_id, Game_time FROM " . EM_GAMES_TABLE . " Union Select game_id, Game_time FROM " . EM_FINALS_TABLE . ") as E on E.game_id = A.tipp_game and E.game_time < ". intval($timestamp_last_game_before_this_day) ."
GROUP BY A.tipp_user
ORDER BY user_points DESC, user_points_result DESC, user_points_difference DESC, user_points_tendency DESC, tipp_user ASC";
Code: Alles auswählen
$int_userpkt = -1;
$int_userpos = 0;
$sql = "Select game_id, Game_time FROM " . EM_GAMES_TABLE . " where game_time < ". intval($timestamp_last_game_before_this_day) . " Union Select game_id, Game_time FROM " . EM_FINALS_TABLE . " where game_time < ". intval($timestamp_last_game_before_this_day);
if( !$result = $db->sql_query($sql) )
message_die(GENERAL_ERROR, $lang['tipp_Sql_Error'], $lang['Error'], __LINE__, __FILE__, $sql);
while($row = $db->sql_fetchrow($result))
{
$gameids[] = $row['game_id'];
}
if (count($gameids)==0) {$gameids_separated = 0;}
else {$gameids_separated = implode(",", $gameids);}
$sql = "SELECT A.tipp_user , sum( A.tipp_points ) AS user_points, count( A.tipp_points ) AS user_total_tipps, count(
B.tipp_points ) AS user_points_tendency, count( C.tipp_points ) AS user_points_difference, count( D.tipp_points ) AS user_points_result
FROM " . EM_TIPPS_TABLE . " A
LEFT JOIN " . EM_TIPPS_TABLE . " B ON A.tipp_id = B.tipp_id
AND A.tipp_points = " . $em_config['points_tendency'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " C ON A.tipp_id = C.tipp_id
AND A.tipp_points = " . $em_config['points_tordiff'] . "
LEFT JOIN " . EM_TIPPS_TABLE . " D ON A.tipp_id = D.tipp_id
AND A.tipp_points = " . $em_config['points_match'] . "
where A.tipp_game in ($gameids_separated)
GROUP BY A.tipp_user
ORDER BY user_points DESC, user_points_result DESC, user_points_difference DESC, user_points_tendency DESC, tipp_user ASC";
Hi Gismo110,Gismo110 hat geschrieben:hi habs irgendwie hinbekommen aber meine config funkt auch nicht:
Code: Alles auswählen
DEBUG MODE SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select distinct spielerid from phpbb_em_torschuetzen_user) ORDE SELECT * FROM phpbb_em_torschuetzen where spielerid in (select distinct spielerid from phpbb_em_torschuetzen_user) ORDER BY tore DESC Line : 269 File : admin_em_config.php
Code: Alles auswählen
Ein Fehler ist aufgetreten.
DEBUG MODE
SQL Error : 1054 Unknown column 'name' in 'order clause'
SELECT * FROM `phpbb_em_torschuetzen` order by name, vorname, verein
Line : 338
File : em_round1.php
Kuschel19 hat geschrieben:patch ? Willst Du mich Heiraten? ^^ kleiner scherz ^^
Gismo du kannst die Änderungen machen nun sehe ich auch die Rangliste nun bin ich der glücklichste Mann der Welt
ein hoch auf patch. Danke Dir das du es geschafft hast meine Rangliste sowie Tippspiel zum laufen zu bringen ohne Dich denke ich mal hätte es nix mehr geworden
Danke Dir nochmal
Code: Alles auswählen
$int_faktortips = round($int_maxbar/(max($arr_userpkt[0], $arr_userpkt[1], $arr_userpkt[2], $arr_userpkt[3], $arr_userpkt[4])/64));
Code: Alles auswählen
$Divisor = (max($arr_userpkt[0], $arr_userpkt[1], $arr_userpkt[2], $arr_userpkt[3], $arr_userpkt[4])/64);
if ($Divisor == 0) {$int_faktortips = 0;} else {$int_faktortips = round($int_maxbar/$Divisor);}