Hallo Zusammen,
ich habe mal wieder ein Problem.
Und zwar möchte ich folgende Abfrage machen.
Per copy paste in phpmyadmin bekomme ich ein erfolgreiches Ergebnis (per sql Abfrage),
nur in meinem script ist das auszugebende Array leer
-> Array()<-.
Ich verwende auch Pear muss ich dazu sagen!
Wo ist mein Fehler?
Als Ausgabe bekomme ich mit einem print_r($res); und print_r($sql);
SELECT c.*, aw1.case_aw1ID, aw2.case_aw2ID, aw3.case_aw3ID, aw4.case_aw4ID, aw5.case_aw5ID,
aw6.case_aw6ID, aw7.case_aw7ID, aw8.case_aw8ID, aw9.case_aw9ID,
aw10.case_aw10ID, aw1.case_aw1, aw2.case_aw2, aw3.case_aw3, aw4.case_aw4, aw5.case_aw5,
aw6.case_aw6, aw7.case_aw7, aw8.case_aw8, aw9.case_aw9, aw10.case_aw10
FROM `Case` AS c JOIN Inbox AS i USING (inboxID) JOIN Case_aw1 AS aw1
ON c.case_aw1ID = aw1.case_aw1ID JOIN Case_aw2 AS aw2 ON
c.case_aw2ID = aw2.case_aw2ID JOIN Case_aw3 AS aw3 ON
c.case_aw3ID = aw3.case_aw3ID JOIN Case_aw4 AS aw4 ON
c.case_aw4ID = aw4.case_aw4ID JOIN Case_aw5 AS aw5 ON
c.case_aw5ID = aw5.case_aw5ID JOIN Case_aw6 AS aw6 ON
c.case_aw6ID = aw6.case_aw6ID JOIN Case_aw7 AS aw7 ON
c.case_aw7ID = aw7.case_aw7ID JOIN Case_aw8 AS aw8 ON
c.case_aw8ID = aw8.case_aw8ID JOIN Case_aw9 AS aw9 ON
c.case_aw9ID = aw9.case_aw9ID JOIN Case_aw10 AS aw10 ON
c.case_aw10ID = aw10.case_aw10ID WHERE i.inbox IN ('FehlQualität')
AND DATE(c.erstellt) >= DATE('2006-06-05') AND DATE(c.erstellt) <= DATE('2006-06-11')
Array ( )
Danke Gruss
ich habe mal wieder ein Problem.
Und zwar möchte ich folgende Abfrage machen.
Per copy paste in phpmyadmin bekomme ich ein erfolgreiches Ergebnis (per sql Abfrage),
nur in meinem script ist das auszugebende Array leer
-> Array()<-.
Ich verwende auch Pear muss ich dazu sagen!
Wo ist mein Fehler?
PHP-Code:
$sql = "SELECT c.*, aw1.case_aw1ID, aw2.case_aw2ID, aw3.case_aw3ID, aw4.case_aw4ID, aw5.case_aw5ID,
aw6.case_aw6ID, aw7.case_aw7ID, aw8.case_aw8ID, aw9.case_aw9ID,
aw10.case_aw10ID, aw1.case_aw1, aw2.case_aw2, aw3.case_aw3, aw4.case_aw4, aw5.case_aw5,
aw6.case_aw6, aw7.case_aw7, aw8.case_aw8, aw9.case_aw9, aw10.case_aw10 FROM `Case` AS c
JOIN Inbox AS i USING (inboxID)
JOIN Case_aw1 AS aw1 ON c.case_aw1ID = aw1.case_aw1ID
JOIN Case_aw2 AS aw2 ON c.case_aw2ID = aw2.case_aw2ID
JOIN Case_aw3 AS aw3 ON c.case_aw3ID = aw3.case_aw3ID
JOIN Case_aw4 AS aw4 ON c.case_aw4ID = aw4.case_aw4ID
JOIN Case_aw5 AS aw5 ON c.case_aw5ID = aw5.case_aw5ID
JOIN Case_aw6 AS aw6 ON c.case_aw6ID = aw6.case_aw6ID
JOIN Case_aw7 AS aw7 ON c.case_aw7ID = aw7.case_aw7ID
JOIN Case_aw8 AS aw8 ON c.case_aw8ID = aw8.case_aw8ID
JOIN Case_aw9 AS aw9 ON c.case_aw9ID = aw9.case_aw9ID
JOIN Case_aw10 AS aw10 ON c.case_aw10ID = aw10.case_aw10ID
WHERE i.inbox IN (".$inboxen.") ".$kw." ";
$res = $db->getAll($sql);
SELECT c.*, aw1.case_aw1ID, aw2.case_aw2ID, aw3.case_aw3ID, aw4.case_aw4ID, aw5.case_aw5ID,
aw6.case_aw6ID, aw7.case_aw7ID, aw8.case_aw8ID, aw9.case_aw9ID,
aw10.case_aw10ID, aw1.case_aw1, aw2.case_aw2, aw3.case_aw3, aw4.case_aw4, aw5.case_aw5,
aw6.case_aw6, aw7.case_aw7, aw8.case_aw8, aw9.case_aw9, aw10.case_aw10
FROM `Case` AS c JOIN Inbox AS i USING (inboxID) JOIN Case_aw1 AS aw1
ON c.case_aw1ID = aw1.case_aw1ID JOIN Case_aw2 AS aw2 ON
c.case_aw2ID = aw2.case_aw2ID JOIN Case_aw3 AS aw3 ON
c.case_aw3ID = aw3.case_aw3ID JOIN Case_aw4 AS aw4 ON
c.case_aw4ID = aw4.case_aw4ID JOIN Case_aw5 AS aw5 ON
c.case_aw5ID = aw5.case_aw5ID JOIN Case_aw6 AS aw6 ON
c.case_aw6ID = aw6.case_aw6ID JOIN Case_aw7 AS aw7 ON
c.case_aw7ID = aw7.case_aw7ID JOIN Case_aw8 AS aw8 ON
c.case_aw8ID = aw8.case_aw8ID JOIN Case_aw9 AS aw9 ON
c.case_aw9ID = aw9.case_aw9ID JOIN Case_aw10 AS aw10 ON
c.case_aw10ID = aw10.case_aw10ID WHERE i.inbox IN ('FehlQualität')
AND DATE(c.erstellt) >= DATE('2006-06-05') AND DATE(c.erstellt) <= DATE('2006-06-11')
Array ( )
Danke Gruss
Kommentar