13 lines
330 B
PHP
13 lines
330 B
PHP
|
<?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;
|
||
|
}
|