30 lines
1.1 KiB
PHP
30 lines
1.1 KiB
PHP
<?php
|
|
error_reporting(0);
|
|
include "../includes/config/config.php";
|
|
include "functions.php";
|
|
include 'log_entry.php';
|
|
$response = array();
|
|
if($conn) {
|
|
$sql = "SELECT * from doc_slots where emp_id = '".$_REQUEST['emp_id']."' AND slot_date = STR_TO_DATE( '".$_REQUEST['slot_date']."' , '%m/%d/%Y') AND ohc_type_id = '". $_REQUEST['ohc_type_id'] ."'";
|
|
error_log("doc_slots ".$sql);
|
|
$result = mysqli_query($conn,$sql);
|
|
if($result) {
|
|
$i=0;
|
|
while($row = mysqli_fetch_assoc($result)){
|
|
// 24-hour time to 12-hour time
|
|
$time_in_12_hour_format = date("g:i a", strtotime(getTableFieldValue('appoinment_slots', 'slot', 'slot_id', $row['slot_id'], '')));
|
|
|
|
|
|
|
|
|
|
$response[$i]['id'] = $row['doc_slot_id'];
|
|
$response[$i]['format_time'] =$time_in_12_hour_format;
|
|
$response[$i]['time'] = getTableFieldValue('appoinment_slots', 'slot', 'slot_id', $row['slot_id'], '');
|
|
// $response[$i]['doj'] =date_format( date_create($row['doj']) ,"d-m-Y");
|
|
// $response[$i]['primary_phone'] = $row['primary_phone'];
|
|
$i++;
|
|
}
|
|
error_log(print_r($response,true));
|
|
echo json_encode($response, JSON_PRETTY_PRINT);
|
|
}
|
|
} |