//$sql_waste="SELECT c.ohc_type_name,a.waste_category_name,b.* FROM `waste_category` a inner join bio_medical_waste b on a.waste_category_id=b.waste_category inner join ohc_type c on c.ohc_type_id=b.ohc_type_id where b.ohc_type_id='".$_SESSION['current_ohcttype']."' ";
//$results_issue_items = mysqli_query($GLOBALS['conn'], $sql_issue_items);
//$sql=base64_decode($filterkey);
//$results= mysqli_query($GLOBALS['conn'], $sql_waste);
$sqll="SELECT count(*) as total FROM `medical_examination` a JOIN patient_master b on a.patient_id=b.id WHERE month(a.medical_entry_date) ='$month' AND year(a.medical_entry_date) =$year and task='peme' and a.forward_status = 'A' and a.ohc_location_id='$current_ohc' ORDER BY a.medical_entry_date ASC";
$result_sqll=mysqli_query($GLOBALS['conn'], $sqll);
$num_rows=mysqli_num_rows($result_sqll);
$row0= mysqli_fetch_assoc($result_sqll);
// error_log("total".$row0['total']);
$sql="SELECT DATE_FORMAT(a.medical_entry_date, '%d-%m-%y') as date,a.*,b.patient_name,b.dept_id,b.employer_contractor_id,b.blood_group FROM `medical_examination` a JOIN patient_master b on a.patient_id=b.id WHERE month(a.medical_entry_date) ='$month' AND year(a.medical_entry_date) ='$year' and task='peme' and a.forward_status = 'A' and a.ohc_location_id='$current_ohc' ORDER BY a.medical_entry_date ASC";
error_log($sql);
$result = mysqli_query($GLOBALS['conn'], $sql);
?>
Sr.
Date
Cert. No
Name
Name of Employer
Department
Blood Group
Remarks
$count=1;
while ($row1= mysqli_fetch_assoc($result)){
extract($row1);
// error_log($row1['employer_contractor_id']);
?>