<?php

include_once 'include/chargementClasses.php';

try{
    
    $laConnexion = new ConnexionBDD();
    $sql = 'SELECT * FROM intervention INNER JOIN arbre ON arbre.id = intervention.idArbre;';
    $reponse = $laConnexion->dbh()->query($sql);
    
    $output = array("lesInterventions"=>$reponse->fetchAll(PDO::FETCH_ASSOC));
    
}catch (Exception $e){
    
    die('Erreur : '.$e->getMessage());
    
}
    
echo(json_encode($output));    