0) { echo ""; echo ""; echo ""; echo ""; while ($myrow = mysqli_fetch_assoc($myres)) { echo ""; echo ""; echo ""; echo ""; } echo "
Birthday
$myrow[femplname] $myrow[fdeptname]
"; } else { echo "
No birthday's today!
"; } $mysql = "select * from ( select femplname,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 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 femplstat='T' ) xtmp order by fevntdate,femplname"; $myres = mysqli_query($mycon, $mysql); if (mysqli_num_rows($myres) > 0) { echo ""; echo ""; echo ""; echo ""; while ($myrow = mysqli_fetch_assoc($myres)) { echo ""; echo ""; echo ""; echo ""; } echo "
Work Anniversary
$myrow[femplname] $myrow[fdeptname]
"; } else { echo "
No work anniversary today!
"; } ?>