0) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $i = 1; while ($myrow = mysqli_fetch_assoc($myres)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $i++; } echo "
Birthday's
#Empl NameClientRemarks
$i. [$myrow[femplcode]] $myrow[femplname] [$myrow[fdeptcode]] $myrow[fdeptname]
"; } 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 ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $i = 1; while ($myrow = mysqli_fetch_assoc($myres)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; $i++; } echo "
Work Anniversary's
#Empl NameClientRemarks
$i. [$myrow[femplcode]] $myrow[femplname] [$myrow[fdeptcode]] $myrow[fdeptname] $myrow[ftotlyear] year's
"; } else { echo "
No Work Anniversary Events!
"; } ?>