ESH/select_appointment_doc.php

24 lines
702 B
PHP
Raw Normal View History

2024-10-23 18:28:06 +05:30
<?php
error_log("hello");
include('includes/config/config.php');
include_once('log_entry.php');
$date = $_REQUEST['appointment_book_date'];
// $day= var_dump($date);
$sql = "SELECT DISTINCT(d.emp_id),p.patient_name from doc_slots d left join patient_master p on d.emp_id=p.id where slot_date=str_to_date('".$date."','%Y-%m-%d') and d.ohc_type_id='".$_SESSION['current_ohcttype']."' ";
error_log($sql."select_dipak");
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);
?>