$que2="SELECT COUNT(*) as countrow FROM attendance WHERE loginTime LIKE '2022-06-02%'"; $res2=mysqli_query($con,$que2); $data=mysqli_fetch_assoc($res2); echo $data['countrow'];