$value) { $requestStr .= $key . " : " . $value . "\n"; error_log($key . " : " . $value . "
\r\n"); } error_log("End Printing Request Attributes"); $need = $_POST['need']; error_log("need:" . $need); if ($need == "PSR") { $value = 'Y'; $sql_report = "select br.* from business_reports_filter_master br left join report_master rm on br.report_id = rm.report_id left join assign_report ar on rm.report_id=ar.report_id where ar.role_id='" . $_SESSION['RoleId'] . "' and rm.report_type = 'D' and br.is_patient_specific= '" . $value . "' "; error_log("sql_report: " . $sql_report); if (!$result = @mysqli_query($conn,$sql_report)) { exit(mysqli_error($conn)); } if (mysqli_num_rows($result) > 0) { while ($row = @mysqli_fetch_assoc($result)) { $r_id = $row['report_id']; $r_name = $row['report_name']; $report_section.=""; } } } else if ($need == "CR") { $value = 'N'; $sql_report = "select br.* from business_reports_filter_master br left join report_master rm on br.report_id = rm.report_id left join assign_report ar on rm.report_id=ar.report_id where ar.role_id='" . $_SESSION['RoleId'] . "' and rm.report_type = 'D' and br.is_patient_specific= '" . $value . "' "; error_log("sql_report: " . $sql_report); if (!$result = @mysqli_query($conn,$sql_report)) { exit(mysqli_error($conn)); } if(mysqli_num_rows($result) > 0) { while ($row = @mysqli_fetch_assoc($result)) { $r_id = $row['report_id']; $r_name = $row['report_name']; $report_section.=""; } } } else { $report_section['status'] = 200; $report_section['message'] = "Data not found!"; } echo json_encode($report_section); ?>