deletelist.php 557 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. header("Content-type:text/html;charset=UTF-8");
  3. include_once("../../untils/conn.php");
  4. $channel_id = $_GET['channel_id'];
  5. $sql = "UPDATE list SET channel = NULL WHERE channel = :channel_id;
  6. UPDATE list SET channel_one = NULL WHERE channel_one = :channel_id;
  7. UPDATE list SET channel_two = NULL WHERE channel_two = :channel_id;";
  8. $stmt = $dbh->prepare($sql);
  9. $stmt->bindParam(':channel_id', $channel_id);
  10. $result = $stmt->execute();
  11. if ($result) {
  12. echo "更新成功!";
  13. } else {
  14. echo "更新失败!";
  15. }
  16. ?>