Hallo,
ich habe ein kleines bzw. großes Problem mit einer SQL Abfrage:
wenn ich folgende Abfrage ausführe dann bekommen ich die Fehlermeldung:
DBD::mysql::st execute failed: Unknown column 'flagtypes.id' in 'on clause' [for Statement:
"SELECT 1, flagtypes.id, flagtypes.name, flagtypes.description, flagtypes.cc_list, flagtypes.target_type, flagtypes.sortkey, flagtypes.is_active, flagtypes.is_requestable, flagtypes.is_requesteeble, flagtypes.is_multiplicable, COUNT(flagexclusions.type_id) AS num_exclusions FROM flagtypes , flaginclusions LEFT JOIN flagexclusions ON (flagtypes.id = flagexclusions.type_id AND (flagexclusions.product_id = 1 OR flagexclusions.product_id IS NULL) AND (flagexclusions.component_id = 1 OR flagexclusions.component_id IS NULL)) WHERE 1=1 AND flagtypes.target_type = 'b' AND flagtypes.id = flaginclusions.type_id AND (flaginclusions.product_id = 1 OR flaginclusions.product_id IS NULL) AND (flaginclusions.component_id = 1 OR flaginclusions.component_id IS NULL) GROUP BY flagtypes.id HAVING num_exclusions = 0 ORDER BY flagtypes.sortkey, flagtypes.name"
]
Ich benutze Mysql 5.0.24a
Kann mir jemand helfen? Ich wäre sehr dankbar
ich habe ein kleines bzw. großes Problem mit einer SQL Abfrage:
wenn ich folgende Abfrage ausführe dann bekommen ich die Fehlermeldung:
DBD::mysql::st execute failed: Unknown column 'flagtypes.id' in 'on clause' [for Statement:
"SELECT 1, flagtypes.id, flagtypes.name, flagtypes.description, flagtypes.cc_list, flagtypes.target_type, flagtypes.sortkey, flagtypes.is_active, flagtypes.is_requestable, flagtypes.is_requesteeble, flagtypes.is_multiplicable, COUNT(flagexclusions.type_id) AS num_exclusions FROM flagtypes , flaginclusions LEFT JOIN flagexclusions ON (flagtypes.id = flagexclusions.type_id AND (flagexclusions.product_id = 1 OR flagexclusions.product_id IS NULL) AND (flagexclusions.component_id = 1 OR flagexclusions.component_id IS NULL)) WHERE 1=1 AND flagtypes.target_type = 'b' AND flagtypes.id = flaginclusions.type_id AND (flaginclusions.product_id = 1 OR flaginclusions.product_id IS NULL) AND (flaginclusions.component_id = 1 OR flaginclusions.component_id IS NULL) GROUP BY flagtypes.id HAVING num_exclusions = 0 ORDER BY flagtypes.sortkey, flagtypes.name"
]
Ich benutze Mysql 5.0.24a
Kann mir jemand helfen? Ich wäre sehr dankbar
Kommentar