Home  >  Article  >  Backend Development  >  How to implement batch deletion operations in php

How to implement batch deletion operations in php

墨辰丷
墨辰丷Original
2018-05-22 11:21:553769browse

This article mainly introduces the PHP batch deletion operation, batch deletion page and .delete processing interface in detail. It has certain reference value. Interested friends can refer to it.

The specific content is as follows

1. Batch delete page piliangcaozuo.php


query($sql); foreach($arr as $v) { echo ""; } ?>
代号 名称
{$v[0]} {$v[1]}

refers to the encapsulation class DBDA.class1. php

host,$this->uid,$this->pwd,$this->dbname);
    
    $result = $db->query($sql);
    
    if($type)
    {
      //如果是查询,显示数据
      return $result->fetch_all();
    }
    else
    {
      //如果是增删改,返回true或者false
      return $result;
    }
  }
}

2. Delete processing interface sanchu.php

query($sql,0))
{
  header("location:piliangcaozuo.php");
}

Related recommendations:

ThinkPHP implements user information query, update and delete functions

mysql creates root ordinary users and modifiesdelete FunctionDetailed explanation

jQuery implements the add and delete function of user information table

The above is the detailed content of How to implement batch deletion operations in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn