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.

3 年之前
1234567891011121314151617181920212223242526272829
  1. <?php
  2. //获取id值
  3. header("Access-Control-Allow-Origin:*");
  4. $post = $_POST['id'];
  5. $num = explode(",",$post);
  6. if(count($num) == 1){
  7. $sql = "update opera_line set IF_DISABLED = 1 where LINE_ID = $post";
  8. }else{
  9. $sql = "update opera_line set IF_DISABLED = 1 where LINE_ID in ($post)";
  10. }
  11. $result=$pdo->exec($sql);
  12. if($result){
  13. $code = 0;
  14. $info = 'success';
  15. $massge = '成功';
  16. }else{
  17. $code = -1;
  18. $info = 'fail';
  19. $massge = '失败';
  20. }
  21. $json['code'] = $code;
  22. $json['info'] = $info;
  23. $json['massge'] = $massge;
  24. echo json_encode($json);
  25. ?>