Seite 9 von 66

Re: [BETA] Football Prediction League

Verfasst: 16.05.2016 21:59
von P@InKiLLeR
Ja den Eintrag gab es nicht,hab einen neuen gemacht und jetzt geht es,danke Dir :wink:

Re: [BETA] Football Prediction League

Verfasst: 18.05.2016 23:00
von silberfuchs
Danke Dir für Deine ausführliche Erklärung! Hoffe ich krieg' das hin :)

Re: [BETA] Football Prediction League

Verfasst: 19.05.2016 15:12
von Hegse
Hallo,

jetzt habe ich nach dem Update von 3.0.14 auf 3.1.9 doch ein kleines Problem. Unter Spielplan aktualisieren wollte ich gerade die Ligadaten der 2ten Bundesliga aktualisieren. Vergleichen mit Datenbank funktioniert noch, klicke ich dann auf Ligadaten aktualisieren kommt folgende Fehlermeldung:

Code: Alles auswählen

SQL ERROR [ mysqli ]

Field 'delivery_date_2' doesn't have a default value [1364]

SQL

REPLACE INTO phpbb3_footb_matchdays (season, league, matchday, delivery_date, matchday_name, matches) SELECT m.season, m.league, m.matchday, min(m.match_datetime) AS delivery_date, md.matchday_name, md.matches FROM phpbb3_footb_matches AS m JOIN phpbb3_footb_leagues AS l ON (l.season = m.season AND l.league = m.league) JOIN phpbb3_footb_matchdays AS md ON (md.season = m.season AND md.league = m.league AND md.matchday = m.matchday) WHERE m.season = 2016 AND m.league = 2 AND l.bet_in_time = 1 AND m.status = 0 GROUP BY m.season, m.league, m.matchday

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/ext/football/football/acp/update_module.php
LINE: 525
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: football\football\acp\update_module->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()
Sonst noch jemand das Problem?

Re: [BETA] Football Prediction League

Verfasst: 19.05.2016 20:39
von football
Dein Fehler tritt nur dann auf, wenn man in den Einstellungen der Liga "Tippabgabe bis zum jeweiligen Spielbeginn" gewählt hat.
Dann müssen bei Spielverlegungen die Abgabetermine neu berechnet werden und folgende Abfrage

Code: Alles auswählen

                    $sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, delivery_date, matchday_name, matches)
                            SELECT m.season, m.league, m.matchday, min(m.match_datetime) AS delivery_date, md.matchday_name, md.matches 
                            FROM ' . FOOTB_MATCHES . ' AS m
                            JOIN ' . FOOTB_LEAGUES . ' AS l ON (l.season = m.season AND l.league = m.league)
                            JOIN ' . FOOTB_MATCHDAYS . " AS md ON (md.season = m.season AND md.league = m.league AND md.matchday = m.matchday)
                            WHERE m.season = $season 
                            AND m.league = $league
                            AND l.bet_in_time = 1 
                            AND m.status = 0 
                            GROUP BY m.season, m.league, m.matchday";
                    $db->sql_query($sql);
wird in ext\football\football\acp\update_module.php (Zeilen 515-525) ausgeführt.

Da ja alle Spiele den Status 3 haben, verstehe ich nicht ganz warum die Abfrage zu einem Fehler führt, aber vermutlich iegt es an einer geänderten Überprüfung in einer neueren MYSQL Version.

Für andere Ligen mit mehreren Abgabeterminen an einem Spieltag ist die SQL sowieso nicht ganz vollständig und muss durch

Code: Alles auswählen

        $sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
                SELECT md.season
                    , md.league
                    , md.matchday
                    , md.status
                    , min_delivery_date AS delivery_date
                    , md.delivery_date_2
                    , md.delivery_date_3
                    , md.matchday_name
                    , md.matches 
                FROM ' . FOOTB_MATCHDAYS . ' AS md 
                INNER JOIN (SELECT season, league, matchday, min(match_datetime) AS min_delivery_date 
                        FROM ' . FOOTB_MATCHES . " 
                        WHERE season = $season AND league = $league AND status = 0
                        GROUP BY season, league, matchday) AS agg
                WHERE md.season = agg.season 
                AND md.league = agg.league 
                AND md.matchday = agg.matchday 
                AND md.delivery_date <> agg.min_delivery_date";
        $db->sql_query($sql);
        $count_updates = $db->sql_affectedrows();

        $sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
                SELECT md.season
                    , md.league
                    , md.matchday
                    , md.status
                    , md.delivery_date
                    , min_delivery_date AS delivery_date_2
                    , md.delivery_date_3
                    , md.matchday_name
                    , md.matches 
                FROM ' . FOOTB_MATCHDAYS . ' AS md 
                INNER JOIN (SELECT season, league, matchday, min(match_datetime) AS min_delivery_date 
                        FROM ' . FOOTB_MATCHES . " 
                        WHERE season = $season AND league = $league AND status = -1
                        GROUP BY season, league, matchday) AS agg
                WHERE md.season = agg.season 
                AND md.league = agg.league 
                AND md.matchday = agg.matchday 
                AND md.delivery_date_2 <> agg.min_delivery_date";
        $db->sql_query($sql);
        $count_updates = $count_updates + $db->sql_affectedrows();

        $sql = 'REPLACE INTO ' . FOOTB_MATCHDAYS . ' (season, league, matchday, status, delivery_date, delivery_date_2, delivery_date_3, matchday_name, matches)
                SELECT md.season
                    , md.league
                    , md.matchday
                    , md.status
                    , md.delivery_date
                    , md.delivery_date_2
                    , min_delivery_date AS delivery_date_3
                    , md.matchday_name
                    , md.matches 
                FROM ' . FOOTB_MATCHDAYS . ' AS md 
                INNER JOIN (SELECT season, league, matchday, min(match_datetime) AS min_delivery_date 
                        FROM ' . FOOTB_MATCHES . " 
                        WHERE season = $season AND league = $league AND status = -2
                        GROUP BY season, league, matchday) AS agg
                WHERE md.season = agg.season 
                AND md.league = agg.league 
                AND md.matchday = agg.matchday 
                AND md.delivery_date_3 <> agg.min_delivery_date";
        $db->sql_query($sql);
        $count_updates = $count_updates + $db->sql_affectedrows();
ersetzt werden.
Probier das bitte einmal aus und gib mir Rückmeldung. Danke

Re: [BETA] Football Prediction League

Verfasst: 19.05.2016 21:56
von Hegse
Habe die Änderungen eingefügt, nun kommt folgender Fehler:

Code: Alles auswählen

SQL ERROR [ mysqli ]

Table 'db*******.phpbb_footb_matchdays' doesn't exist [1146]

SQL

UPDATE phpbb_footb_matchdays AS target INNER JOIN ( SELECT md.season , md.league , md.matchday , IF( md.delivery_date > now(), 0, IF(ISNULL(min(e.extra_status)), IF(min(m.status) = 1 AND max(m.status) > 1, 2, GREATEST(min(m.status), 0)), IF(LEAST(min(m.status), min(e.extra_status)) = 1 AND GREATEST(max(m.status), max(e.extra_status)) > 1, 2, GREATEST(LEAST(min(m.status), min(e.extra_status)), 0)))) As new_status FROM phpbb3_footb_matchdays AS md LEFT JOIN phpbb3_footb_matches AS m ON (m.season = md.season AND m.league = md.league AND m.matchday = md.matchday) LEFT JOIN phpbb3_footb_extra AS e ON (e.season = md.season AND e.league = md.league AND e.matchday_eval = md.matchday) WHERE md.season = 2016 AND md.league = 2 GROUP BY md.season, md.league, md.matchday) AS source ON target.season = source.season AND target.league = source.league AND target.matchday = source.matchday SET target.status = source.new_status

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 852
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/ext/football/football/acp/update_module.php
LINE: 747
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/includes/functions_module.php
LINE: 674
CALL: football\football\acp\update_module->main()

FILE: [ROOT]/adm/index.php
LINE: 81
CALL: p_master->load_active()

Bitte informiere die Board-Administration oder den Webmaster:

Re: [BETA] Football Prediction League

Verfasst: 20.05.2016 16:14
von football
Hast du einen anderen Tabellen-Präfix? Aber selbst der sollte ja korrekt gesetzt werden.
Warum findet das Programm die Tabelle nicht.
Wurde sie gelöscht? Greifst du auf die falsche Datenbank zu? (config.php prüfen)

Re: [BETA] Football Prediction League

Verfasst: 20.05.2016 16:20
von Hegse
Ja, den habe ich, phpbb3. Alles andere von der Extension funktioniert ja.

Weiter unten in der Fehlermeldung passt es dann scheinbar mit phpbb3_footb_matchdays...

Re: [BETA] Football Prediction League

Verfasst: 20.05.2016 17:57
von silberfuchs
Sorry, wenn ich hier nochmals "dazwischen funke" - kann ich eigentlich eine EM auf meiner Testseite auch mal komplett manuell fertig spielen, also mit den bisherigen Daten nun manuell "vorab" weitermachen? Geht sowas, auch wenn das Datum aktuell noch in der Zukunft liegt? Ich möchte irgendwie sicherstellen, dass ich auch alleine weiss, was zu tun ist, auch wenn @football während der "heißen Phase" nicht zur Verfügung steht und die neuen Paarungen fehlen....

Re: [BETA] Football Prediction League

Verfasst: 20.05.2016 22:39
von Hegse
Gerade noch einmal alles kontrolliert, die Tabelle existiert und die config.php past auch. Bild

edit:
Ich habe jetzt zum testen lokal unter Xampp noch einmal phpbb 3.1.9 mit dem Tabellen-Präfix phpbb installiert. Anschließend die Football Extension eingepflegt und die Saison 2016 mit der Liga EM 2016 angelegt. Ändere ich nun die Ligadetails des EM Tippspiels auf die Tippabgabe bis zum jeweiligen Spielbeginn und führe eine Spielplan Aktualisierung durch werden die geänderten Abgabetermine erkannt. Ich kann die Ligadaten daraufhin ohne Probleme aktualisieren. Dafür ist auch keine Änderung in der Datei in ext\football\football\acp\update_module.php nötig.

Irgendwie gibt es scheinbar Probleme mit dem Tabellen-Präfix phpbb3 und der Extensions in meinem Live Forum. Lokal in der neuinstallation mit dem Präfix phpbb klappt alles ohne Probleme. Die config.php ist wie gesagt ok. :-?

Re: [BETA] Football Prediction League

Verfasst: 21.05.2016 10:10
von football
Sorry, in der Eile hatte ich deine Fehlermeldung nicht richtig durchgelesen.
Steht ja alles dort:
Table 'db*******.phpbb_footb_matchdays' doesn't exist [1146]

FILE: [ROOT]/ext/football/football/acp/update_module.php
LINE: 747

Das ist natürlich eine andere SQL Abfrage, in der der Tabellename direkt angegeben ist. :oops:
Und da du einen anderen Tabellenprefix hast, kommt der Fehler natürlich.

Bitte in ext\football\football\acp\update_module.php
$sql = "UPDATE phpbb_footb_matchdays AS target
durch
$sql = 'UPDATE ' . FOOTB_MATCHDAYS . " AS target
ersetzen.