如何显示缺席或当前结果
请帮我解决这个问题谢谢
现在显示这样的结果
________________________________________
Name TeacherNo Attendance
________________________________________
XYZ 993 5 Days Present
Abc 991 7 Days Present
123 955 2 Days Present
________________________________________
我想要这样
________________________________________________________________
Name TeacherNo Present Day Absent Days
_________________________________________________________________
XYZ 993 5 Days Present 3 Days Present
Abc 991 7 Days Present 0 Days Present
123 955 2 Days Present 4 Days Present
________________________________________________________________
这是代码
$result1 = mysql_query("select name ,id ,`teacherno` as teacherno, CONCAT(count(`teacherno`),' Present days') as Attendance
from tattendance
where `Attendance` = 'present' AND date BETWEEN '2013-04-01' AND '2013-04-07' group by `teacherno` order by attendance desc");