";
$sql8="select rnk,count(*) as nrnk from $_ev group by rnk";
$result8=mysql_query($sql8);
while ($db8=mysql_fetch_array($result8)) {
if ($db8[rnk]==1) { $crnk='ผู้บริหาร'; }
if ($db8[rnk]==2) { $crnk='บุคลากรทางการศึกษา'; }
if ($db8[rnk]==3) { $crnk='ครูผู้สอน'; }
if ($db8[rnk]==4) { $crnk='ก.ต.ป.น.'; }
if ($db8[rnk]==5) { $crnk='คณะกรรมการสถานศึกษา'; }
if ($db8[rnk]==6) { $crnk='อื่นๆ'; }
if ($db8[rnk]=='') { $crnk='ไม่ระบุ'; }
$perc=number_format($db8[nrnk]*100/$trow,2);
echo "
$crnk
$db8[nrnk]
$perc
";
$trnk+=$db8[nrnk];
}
echo "
รวม
$trnk
100.00
";
echo "ระดับความพึงพอใจ
หัวข้อ
จำนวนตอบ
ค่าเฉลี่ย
S.D.
";
$sql="select * from $_qs";
$result=mysql_query($sql);
$rw=1;
while ($db=mysql_fetch_array($result)) {
$qavg=round($avg[$rw-1],2);
$qsd=round($sd[$rw-1],2);
echo "
$rw.$db[qtext]
$avg[ans]
$qavg
$qsd
";
$rw++;
}
echo '
';
$sql3="select * from $_qs";
$result3=mysql_query($sql3);
$qn=1;
while ($db3=mysql_fetch_array($result3)) {
$qq="q$qn";
$sql="select $qq ,count(*) as nq from $_ev group by $qq ";
$result=mysql_query($sql);
echo "