时间:2021-07-01 10:21:17 帮助过:3人阅读
$q=$_POST["employeenumber"];
$con = mysql_connect('localhost', 'root', '');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("org", $con);
echo "
架构 | 盈利额 |
---|---|
" . $row['架构'] . " | ";
$q=$_POST["employeenumber"];
$con = mysql_connect('localhost', 'root', '');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("org", $con);
echo '';
mysql_close($con);
?>
$con = mysql_connect('localhost', 'root', '');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("org", $con);
$employeenumber = $_POST["employeenumber"];
$sql="SELECT id, 架构,盈利额 FROM `org` WHERE 主管工号 = '".$q."'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
if($_POST['yl'.$row['id']]){
$sqlstr = "update `org` set 盈利额='".$_POST['yl'.$row['id']]."' where id='".$row['id']."'"; // 更新入db
mysql_query($sqlstr) or die(mysql_error());
}
}
mysql_close($con);
header('location:index.php?q='.$employeenumber); // 跳轉回去
?>
$sqlstr = "update `org` set 盈利额='" . $_POST['yl'.$row['id']] . "' where id='".$row['id']."'";