$query="SELECT count(a.appointment_id) as count_mf,DATE(NOW()-INTERVAL $i DAY) from employee_appointment a where DATE(a.appointment_date) = date(NOW()-INTERVAL $i DAY) and shift_type = 'A'";
$query="SELECT count(a.appointment_id) as count_mf from employee_appointment a where DATE(a.appointment_date) = date(NOW()-INTERVAL $i DAY) and shift_type = 'B'";
$query="SELECT count(a.appointment_id) as count_mf from employee_appointment a where DATE(a.appointment_date) = date(NOW()-INTERVAL $i DAY) and shift_type = 'C'";
$query="SELECT count(a.appointment_id) as count_mf from employee_appointment a where DATE(a.appointment_date) = date(NOW()-INTERVAL $i DAY) and shift_type = 'G'";
<?php$sql_shift_total="select count(a.appointment_id) as count_male from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'M' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type in ('A','B','C','G')";
<?php$sql_shifta="select count(a.appointment_id) as count_male from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'M' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'A'";
<?php$sql_shiftb="select count(a.appointment_id) as count_male from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'M' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'B'";
<?php$sql_shiftg="select count(a.appointment_id) as count_male from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'M' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'G'";
<?php$sql_shiftc="select count(a.appointment_id) as count_male from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'M' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'C'";
<?php$sql_shift_total="select count(a.appointment_id) as count_female from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'F' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type in ('A','B','C','G')";
<?php$sql_shifta="select count(a.appointment_id) as count_female from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'F' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'A'";
<?php$sql_shiftb="select count(a.appointment_id) as count_female from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'F' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'B'";
<?php$sql_shiftg="select count(a.appointment_id) as count_female from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'F' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'G'";
<?php$sql_shiftc="select count(a.appointment_id) as count_female from employee_appointment a left join patient_master b on a.emp_id = b.id where b.gender = 'F' and DATE(a.appointment_date) = date(NOW()-INTERVAL 1 DAY) and a.shift_type = 'C'";
<?php$sql="select count(distinct(a.response_id)) as count_ffi from questionaire_master_response a left join questionaire_master_response_details b on a.response_id = b.response_id left join patient_master c on a.patient_id = c.id WHERE a.form_type IN ('ffi') and a.approval_status = 'Y' AND a.f_status = 'CLS'";