"; } if($hasWriteAccess) { $edit_link=""; } if($hasExecuteAccess) { $delete_link=""; } $space="   "; $days = getCommaSeperatedValuesForInClause("select days from days ","id",$row_vaccine['days']); $slots = getCommaSeperatedValuesForInClause("select TIME_FORMAT(slot, '%h:%i %p') as slot from appoinment_slots ","slot_id",$row_vaccine['slots']); $doctor_name = getFieldFromTable('patient_name','patient_master','id',$row_vaccine['doctor_id']); $links = $assign_link.$space.$view_link.$space.$edit_link.$space.$delete_link; $data['rows'][] = array( 'id' => $row_vaccine['id'], 'cell' => array($count++,$doctor_name,$days,$slots, $links) ); } echo json_encode($data); ?>