query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."
" ;
$_SESSION["Tisch1"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
}
} else
{
$_SESSION["Tisch1"] = "FREI";
echo $_SESSION["Tisch1"]."
";
}
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='2'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."
" ;
$_SESSION["Tisch2"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
}
} else
{
$_SESSION["Tisch2"] = "FREI";
echo $_SESSION["Tisch2"]."
";
}
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='3'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."
" ;
$_SESSION["Tisch3"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
}
} else
{
$_SESSION["Tisch3"] = "FREI";
echo $_SESSION["Tisch3"]."
";
}
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='4'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."
" ;
$_SESSION["Tisch4"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
}
} else
{
$_SESSION["Tisch4"] = "FREI";
echo $_SESSION["Tisch4"]."
";
}
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='5'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."
" ;
$_SESSION["Tisch5"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
}
} else
{
$_SESSION["Tisch5"] = "FREI";
echo $_SESSION["Tisch5"]."
";
}
$sql = "SELECT * FROM calenderplanner WHERE month='$month' AND day='$day' AND tisch='6'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo $row['uniqueid'].$row['year'].$row['month'].$row['day'].$row['reserviert'].$row['reserviertvon'].$row['tisch']."
" ;
$_SESSION["Tisch6"] = array($row['uniqueid'],$row['month'],$row['day'],$row['reserviert'],$row['reserviertvon'],$row['tisch']);
}
} else
{
$_SESSION["Tisch6"] = "FREI";
echo $_SESSION["Tisch6"]."
";
}
header("location:index.php?result=gotrecords");
}
?>