format('m') < 4) {
$financialYearStart = ($randomDateTime->format('Y') - 1) . "-04-01";
} else {
$financialYearStart = $randomDateTime->format('Y') . "-04-01";
}
// Calculate the financial year end date
if ($randomDateTime->format('m') < 4) {
$financialYearEnd = $randomDateTime->format('Y') . "-03-31";
} else {
$financialYearEnd = ($randomDateTime->format('Y') + 1) . "-03-31";
}
$get_chk_ids = "SELECT * from checkup_form where emp_id = $emp_id and checkup_date between '$financialYearStart' AND '$financialYearEnd' AND (checkup_type_id IN (42,52,53,54,57))";
error_log($get_chk_ids . " ");
$get_chk_conn = mysqli_query($conn, $get_chk_ids);
$values_asasas = array();
while ($all_ids = mysqli_fetch_array($get_chk_conn)) {
if ($row_checkup['checkup_id'] == $all_ids['checkup_id']) {
continue;
}
$newValueIdds = $all_ids['checkup_id'];
$values_asasas[] = $newValueIdds;
}
$commaSeparatedString = implode(',', $values_asasas);
error_log($commaSeparatedString . "check ids ");
$item_id_array = explode(',', $commaSeparatedString);
$item_id_array = array_map('intval', $item_id_array);
foreach ($item_id_array as $item_id) {
$checkup_type_id = getFieldFromTable('checkup_type_id', 'checkup_form', 'checkup_id', $item_id);
$checkup_type_name = getFieldFromTable('checkup_type_name', 'checkup_type', 'checkup_type_id', $checkup_type_id);
?>
query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
?>
";
}
} else {
echo "No results found
";
}
}
include('previous_data_history.php');
?>