Wer kann bei folgendem Problem helfen?
Mein MySQL server schickt eine Fehlermeldung, wenn das Statement über PHPMyAdmin ausgeführt wird:
SELECT "Total youth", Zone, COUNT( Zone ) AS "Number"
FROM Youth
WHERE DATEDIFF(
NOW( ) , BirthDate
) / 365.25 & gt ; =15
GROUP BY Zone
UNION SELECT "Declared youth", Zone, COUNT( Zone )
FROM Youth
WHERE DATEDIFF(
NOW( ) , BirthDate
) / 365.25 & gt ; =15
AND Declared = True
GROUP BY Zone
UNION SELECT "Undeclared youth", Zone, COUNT( Zone )
FROM Youth
WHERE DATEDIFF(
NOW( ) , BirthDate
) / 365.25 & gt ; =15
AND Declared = False
GROUP BY Zone
UNION SELECT "Total junior youth", Zone, COUNT( Zone )
FROM Youth
WHERE DATEDIFF(
NOW( ) , BirthDate
) / 365.25 & lt;
15 GROUP BY Zone UNION SELECT "Total children", Zone, COUNT( Zone )
FROM Children
GROUP BY Zone
LIMIT 0 , 30
Hier ist die Fehlermeldung:
#1305 - FUNCTION institute.DATEDIFF does not exist
Das verstehe ich nicht; die DATEDIFF Funktion ist doch in MySQL eingebaut. Ausserdem funktioniert der oben aufgeführte SQL Kode via den MySQL query browser.