Результат по дате";
echo "
";
$query = "SELECT * FROM object_event
WHERE date_event='$calendar' AND id_object='$machineid' ORDER BY id DESC";
$result = mysqli_query($link, $query) or die("Ошибка " . mysqli_error($link));
while ($res = mysqli_fetch_array($result)) {
echo $res['date_event']." ".$res['event'];
echo "
";
}
}
if (isset ($_POST['dateget']) && $calendar==null) {
echo "
";
echo "Результат по объекту";
echo "
";
$query = "SELECT * FROM object_event
WHERE id_object='$machineid' ORDER BY id DESC ";
$result = mysqli_query($link, $query) or die("Ошибка " . mysqli_error($link));
while ($res = mysqli_fetch_array($result)) {
echo $res['date_event']." ".$res['event'];
echo "
";
}
}
}