<?php
require_once("template.php");

$requete="SELECT `date`, `aliment`,`type`,`calories`,`quantite`, `journal`.`id_aliment`,`journal`.`id` FROM `journal` JOIN `aliments` ON `journal`.`id_aliment`=`aliments`.`id_aliment`";
$result = $mysqli->query($requete);
$journal=$result->fetch_all();

reponse_json($journal);