0) { // 如果查询结果存在数据,则进行修改操作 $row = mysqli_fetch_assoc($result); $proxy_sta = $row['proxy_sta']; // 判断proxy_sta的值并进行修改 if ($proxy_sta == 0) { $update_sql = "UPDATE proxy SET proxy_sta = 1 WHERE proxy_id = $proxy_id"; } else { $update_sql = "UPDATE proxy SET proxy_sta = 0, state_ban ='$state_ban' WHERE proxy_id = $proxy_id"; } $update_result = mysqli_query($con, $update_sql); if ($update_result) { echo ""; echo (""); } else { // echo "Error updating record: " . $con->error; echo ""; echo (""); } } else { // echo "Error updating record: " . $con->error; echo ""; echo (""); } ?>