diff --git a/sys0-code/app/reservations.php b/sys0-code/app/reservations.php index 67f82a3..3975b30 100644 --- a/sys0-code/app/reservations.php +++ b/sys0-code/app/reservations.php @@ -111,6 +111,16 @@ if(isset($_GET["del"])){ while($row = $result->fetch_assoc()) { echo("".$row["time_from"]."".$row["time_to"]."".$row["day"]."".$row["name"]."Löschen"); } + $stmt->close(); + //check if is set for teachers, which do not have a class but always id 0 + $sql="select reservations.id as res_id,time_to,time_from,day from reservations WHERE for_class=0 ORDER BY reservations.id desc;"; + $stmt = $link->prepare($sql); + $stmt->execute(); + $result = $stmt->get_result(); + while($row = $result->fetch_assoc()) { + echo("".$row["time_from"]."".$row["time_to"]."".$row["day"]."LehrerLöschen"); + } + echo(""); ?>