$sql="SELECT DISTINCT(d.slot_id),TIME_FORMAT(slot, '%h:%i %p') as slot,TIME_FORMAT(p.slot_end, '%h:%i %p') as slot_end ,d.slot_count,d.status from doc_slots d left join appoinment_slots p on d.slot_id=p.slot_id where p.app_type='MED' and slot_date=str_to_date('".$date."','%Y-%m-%d') and d.ohc_type_id='".$_SESSION['current_ohcttype']."' and emp_id in (select emp_id from tbl_users where FIND_IN_SET('".$role_id."',role_id) > 0 ) ";
// $sql = "SELECT DISTINCT(slot_id),TIME_FORMAT(slot, '%h:%i %p') as slot,TIME_FORMAT(slot_end, '%h:%i %p') as slot_end ,slot_count from appoinment_slots where app_type='MED' ";