$query_4="SELECT * FROM `ref_edu_level` order by edu_level_piority asc ";
$rs[slevel]=mysql_query($query_4,$link);
while($rss[slevel]=mysql_fetch_array($rs[slevel])){
$query4="SELECT distinct staff_id FROM `history_edu` where edu_level_id ='".$rss[slevel][edu_level_id]."' order by history_edu_id ";
$result4=mysql_query($query4,$link);
$row4=mysql_num_rows($result4);
}