query("SELECT * FROM rooster INNER JOIN docenten ON rooster.docent = docenten.id WHERE dag = DATE('" . $date . "');"); if ($result->num_rows === 1) { $rooster = [$result->fetch_assoc()]; } else { $rooster = $result; }