云计算课程大作业
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
725 B

<?php
//引入公共文件
require("./conn.php");
// 考勤数sum_all+1
mysqli_query($conn, "update var set sum_all=sum_all+1;");
// 获取考勤数
$var=mysqli_fetch_assoc(mysqli_query($conn, "select sum_all from var"));
$sum=$var['sum_all'];
echo "当前考勤数为:".$sum;
// 创建临时表选择考勤职工
mysqli_query($conn, "drop table if exists staff_temp");
mysqli_query($conn, "create table staff_temp as select * from staff_info");
// 获取临时表数据
$res = mysqli_query($conn, "select * from staff_temp order by dept,jobnum");
//建立一个空数组
$data = array();
while($row = mysqli_fetch_assoc($res)){
$data[] = $row;
}
//引入列表页面
require("../views/attend_select.html");
?>