29 lines
1013 B
PHP
29 lines
1013 B
PHP
<?php
|
|
error_reporting(0);
|
|
include "../includes/config/config.php";
|
|
include "functions.php";
|
|
include 'log_entry.php';
|
|
$response = array();
|
|
if($conn) {
|
|
$sql = "SELECT * from appointment_details where emp_id='".$_REQUEST['emp_id']."'";
|
|
error_log("errr".$sql);
|
|
$result = mysqli_query($conn,$sql);
|
|
if($result) {
|
|
$i=0;
|
|
$d=1;
|
|
while($row = mysqli_fetch_assoc($result)){
|
|
$response[$i]['srno'] =$d;
|
|
$response[$i]['doctor_id'] = getTableFieldValue('patient_master', 'patient_name', 'id', $row['doctor_id'], '');
|
|
$response[$i]['date'] =date_format( date_create($row['date']) ,"d-m-Y");
|
|
$time_in_12_hour_format = date("g:i a", strtotime(getTableFieldValue('appoinment_slots', 'slot', 'slot_id', $row['slot_id'], '')));
|
|
$response[$i]['time'] = $time_in_12_hour_format;
|
|
$response[$i]['day'] = $row['day'];
|
|
$response[$i]['app_type'] = $row['app_type'];
|
|
$response[$i]['status'] = $row['status'];
|
|
$i++;
|
|
$d++;
|
|
}
|
|
error_log(print_r($response,true));
|
|
echo json_encode($response, JSON_PRETTY_PRINT);
|
|
}
|
|
} |