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

31 lines
650 B
PHP

<?php
include('includes/config/config.php');
if(isset($_REQUEST['appointment_id'])){
$sql_for_appointment="select * from employee_appointment where appointment_id='".$_REQUEST['appointment_id']."'";
//echo "query:".$sql_for_appointment;
if (!$result = @mysqli_query($conn,$sql_for_appointment)) {
exit(mysqli_error($conn));
}
if(mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
//extract($row);
$data = $row;
}
}
else
{
$data['status'] = 200;
$data['message'] = "Data not found!";
}
}
//echo $data;
echo json_encode($data);
?>