ohctech_p8/select_employee_bp.php
2024-10-16 19:18:52 +05:30

26 lines
680 B
PHP

<?php
include ('includes/config/config.php');
include ('includes/functions.php');
$query = "select checkup_date, sbp,dbp,heart_rate from checkup_form where checkup_date between '2019/04/1' and '2019/04/06' and emp_id='6' ";
if (! $result = @mysqli_query($conn,$query)) {
exit(mysqli_error($conn));
}
$x = 0;
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
$data[$x]['sbp'] = $row['sbp'];
$data[$x]['dbp'] = $row['dbp'];
$data[$x]['heart_rate'] = $row['heart_rate'];
$data[$x]['checkup_date']=date_format(date_create($row['checkup_date']),"d-M-Y");
$x++;
}
}
echo json_encode($data);
?>