Posted in PHP onJune 05, 2009
首先要了解sql语句
$SQL="delete from `3water` where id in (1,2,4)";
表单大概是:
<form action="" method="post"> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/> <input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="4"/> <input type="submit"/> </form>
php函数主要用到implode
$ID_Dele= implode(",",$_POST['ID_Dele']); $SQL="delete from `user` where id in ($ID_Dele)";
https://3water.com/article/6488.htm
PHP 批量删除 sql语句
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@