blob: 9c9d45432071db985050f6274b46798a7abb4fb1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<?php
require_once __DIR__ . '/db.php';
$res = $db->query('select termin, uhrzeit from proben where date(STR_TO_DATE(termin, "%d.%m.%Y")) > (SELECT CURDATE() );');
$proben = $res->fetchAll(PDO::FETCH_ASSOC);
$res = $db->query('select termin,uhrzeit,beschreibung,anfahrt from konzert order by id desc limit 1;');
$konzert = $res->fetchAll(PDO::FETCH_ASSOC);
$output = array("konzert" => $konzert, "proben" => $proben);
header('Content-Type: application/json');
echo( json_encode($output, JSON_PRETTY_PRINT) );
|