illuminatus26
Erfahrenes Mitglied
Hallo zusammen.
Habe folgendes Query gebastelt.
Die Tabellensturktur sieht so aus:
tippspiel__tipp:
id
spielid
heimtore
gasttore
nutzerid
spieltagid
saisonid
tippspiel__spiel:
id
spieltagid
heimid
gastid
lfdnr
wochentagid
anstoss
datum
saisonid
tippspiel__mannschaften:
id
verein
stadion
Jetzt wird mir leider immer nur die heim- und gastid ausgegeben, aber nicht die Vereinsnamen......
Wo liegt der Fehler?
Bekomme auch keine Fehlermeldung.
Es werden exakt die Datensätze angezeigt, die auch vorhanden sind?
Hat jemand ne Idee?
Danke.
Habe folgendes Query gebastelt.
Code:
SELECT `tippspiel__tipp`.`saisonid`, `tippspiel__tipp`.`spieltagid`, `tippspiel__spiel`.`lfdnr`, `tippspiel__spiel`.`datum`, `tippspiel__spiel`.`anstoss`, `tippspiel__spiel`.`heimid` AS heim, `tippspiel__spiel`.`gastid` AS gast, `tippspiel__tipp`.`heimtore`, `tippspiel__tipp`.`gasttore`, `tippspiel__tipp`.`nutzerid`
FROM `tippspiel__tipp`
LEFT JOIN `tippspiel__spiel` ON `tippspiel__tipp`.`spielid` = `tippspiel__spiel`.`id`
LEFT JOIN `tippspiel__mannschaften` ON `tippspiel__spiel`.`gastid` = `tippspiel__mannschaften`.`id`
LEFT JOIN `tippspiel__mannschaften` AS heim ON `tippspiel__spiel`.`heimid` = `tippspiel__mannschaften`.`verein`
LEFT JOIN `tippspiel__mannschaften` AS gast ON `tippspiel__spiel`.`gastid` = `tippspiel__mannschaften`.`verein`
Die Tabellensturktur sieht so aus:
tippspiel__tipp:
id
spielid
heimtore
gasttore
nutzerid
spieltagid
saisonid
tippspiel__spiel:
id
spieltagid
heimid
gastid
lfdnr
wochentagid
anstoss
datum
saisonid
tippspiel__mannschaften:
id
verein
stadion
Jetzt wird mir leider immer nur die heim- und gastid ausgegeben, aber nicht die Vereinsnamen......
Wo liegt der Fehler?
Bekomme auch keine Fehlermeldung.
Es werden exakt die Datensätze angezeigt, die auch vorhanden sind?
Hat jemand ne Idee?
Danke.