PHP : Code get all supervisor to Checkbox.
$SQL="SELECT EmpEmail, PositionCalled FROM sci._employees ";
$SQL.=" LEFT JOIN sci._positions ON _positions.PositionCode=_employees.PositionCode";
$SQL.=" LEFT JOIN sci._sections ON _sections.SectionId=_positions.SectionId";
$SQL.=" LEFT JOIN sci._departs ON _departs.DepartId=_sections.DepartId";
$SQL.=" WHERE _employees.isEnabled = 'Y'";
$SQL.=" AND sci._employees.LevelPriority ='6'";
$SQL.=" ORDER BY _departs.DepartId,EmpId";
$NumRows=$myDB->Query($SQL);
$SupervisorSelect ="<b>หน.งาน</b><br><table border='0' width='100%'><tr>";
$i = 0;
$mod = 0;
$mod = $i % 8; //### แบ่งแถวล่ะกี่ Checkbox
$SupervisorSelect.="</tr><tr>";
}
$SupervisorSelect.="<td><input type='checkbox' name='SupervisorList[]' value='".$row["EmpEmail"]."'>".tis2utf8($row["PositionCalled"])."</td>";
$i++;
}
$SupervisorSelect.="</table>";
No comments:
Post a Comment