ESH/select_previous_appointment.php
2024-10-23 18:28:06 +05:30

24 lines
648 B
PHP

<?php
include('includes/config/config.php');
include('includes/functions.php');
include_once('log_entry.php');
$id=$_REQUEST['id'];
$app_type = $_REQUEST['app_type'];
$sql = "SELECT * from appointment_details where emp_id='".$id."' and ohc_type_id='".$_SESSION['current_ohcttype']."' and app_type='".$app_type."' and status='BOOKED'";
error_log("have_app ".$sql);
if (!$result = @mysqli_query($conn,$sql)) {
exit(mysqli_error($conn));
}
$data = array();
while ($row = mysqli_fetch_assoc($result)) {
array_push($data, $row);
}
$data['count']=mysqli_num_rows($result);
error_log('data '.print_r($data,true));
echo json_encode($data);
?>