We have a human resource management system that need some modifications. I'd like to show all personnel on leave using the date stamp.
PHP Code:
<?php
$link = mysqli_connect("localhost", "root", "", "ihrmis");
$result = mysqli_query($link, "select COUNT(employee_id) AS count FROM ats_leave_apps WHERE DATE('M Y') = CURDATE()");
if(!$result) {
die('Error: '. mysqli_error($link));
} else {
$num_rows = mysqli_fetch_assoc($result);
echo $num_rows['count'];
}
?>
Below is the structure of our table where to get those datas
We want that if the date rows equal to the current date it will show in the dashboard of our system. I hope some generous hearts to help us. Thanks in advance.