0) {
echo "";
echo "";
echo "Birthday's | ";
echo "
";
echo "";
echo "# | ";
echo "Empl Name | ";
echo "Client | ";
echo "Remarks | ";
echo "
";
$i = 1;
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "";
echo " $i. | ";
echo " [$myrow[femplcode]] $myrow[femplname] | ";
echo " [$myrow[fdeptcode]] $myrow[fdeptname] | ";
echo " | ";
echo "
";
$i++;
}
echo "
";
} else {
echo "No Birthday Events!
";
}
$mysql = "select * from (
select e.femplcode,e.femplname,e.fempldesn,e.fdeptcode,fdeptname,'Work Anniversary' as fevntremk,
(case when femplstat='T' then 'Active' else 'Not Active' end) as femplstat,
concat(date_format(fjoindate,'%d %b'),' ',year(current_date)) as fevntdate,
year(current_date)-year(fjoindate) as ftotlyear
from masempl e
left join masdept d on e.fdeptcode=d.fdeptcode
where date_format(fjoindate,'%d-%m') = date_format(current_date,'%d-%m') and date_format(fjoindate,'%Y') <> date_format(current_date,'%Y')
and femplstat='T' and fempltype='P' and e.fdeptcode not in ('DEP','IHF')) xtmp
order by fevntdate,femplname";
$myres = mysqli_query($mycon, $mysql);
if (mysqli_num_rows($myres) > 0) {
echo "";
echo "";
echo "Work Anniversary's | ";
echo "
";
echo "";
echo "# | ";
echo "Empl Name | ";
echo "Client | ";
echo "Remarks | ";
echo "
";
$i = 1;
while ($myrow = mysqli_fetch_assoc($myres)) {
echo "";
echo " $i. | ";
echo " [$myrow[femplcode]] $myrow[femplname] | ";
echo " [$myrow[fdeptcode]] $myrow[fdeptname] | ";
echo " $myrow[ftotlyear] year's | ";
echo "
";
$i++;
}
echo "
";
} else {
echo "No Work Anniversary Events!
";
}
?>