gymrooster_php/php/index.php

13 lines
330 B
PHP
Raw Normal View History

<?php
require "conn.php";
$today = date("Y-m-d"); // Create date in mysql DATE format.
$result = $conn->query("SELECT * FROM rooster INNER JOIN docenten ON rooster.docent = docenten.id WHERE dag = DATE('" . $today . "');");
if ($result->num_rows === 1) {
$rooster = [$result->fetch_assoc()];
} else {
$rooster = $result;
}