Home > Backend Development > PHP Tutorial > mysql delete 复选框选择的内容

mysql delete 复选框选择的内容

WBOY
Release: 2016-06-23 14:08:49
Original
779 people have browsed it

mysql delete 复选框选择的内容,我在网上搜到的都是用循环一条一条的删除记录,请问有没有一次性删除选择的记录??


回复讨论(解决方案)

delete from tt where id in(...) ;

在数据量不大的情况下,循环删除是比较简易的方法。

如果需要需要处理大量数据,那加上事务处理就行了

先把post复选框中的数组,循环转换为字符串然后再:delete from tt where id in(...) ;就好了。

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template