Welcome Guest, Not a member yet? Register   Sign In
How to show date rows equals current date?
#1
Question 

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.
Reply


Messages In This Thread
How to show date rows equals current date? - by jelz2018 - 02-28-2019, 07:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB