Pas si simple pour les avions qui ne volent pas
SELECT '','',CONCAT('Depuis le ',DATE_FORMAT(( NOW()-INTERVAL 14 DAY ),'%d/%m/%Y' )) AS Date
UNION
SELECT aircraft.id AS Num, aircraft.callsign AS Immat,
IF (
(SELECT SUM( duration )
FROM flight
WHERE flight.aircraft_id = Num AND start_date > ( NOW() - INTERVAL 14 DAY )
GROUP BY flight.aircraft_id) IS NULL,'Pas de vol',CONCAT('Der
Forum:
Evolutions et Adaptations