PHP 批量刪除 sql語句
更新時間:2009年06月05日 00:27:50 作者:
PHP 批量刪除 sql語句
首先要了解sql語句
$SQL="delete from `jb51` 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函數(shù)主要用到implode
$ID_Dele= implode(",",$_POST['ID_Dele']);
$SQL="delete from `user` where id in ($ID_Dele)";
http://www.dhdzp.com/article/6488.htm
$SQL="delete from `jb51` where id in (1,2,4)";
表單大概是:
復(fù)制代碼 代碼如下:
<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函數(shù)主要用到implode
復(fù)制代碼 代碼如下:
$ID_Dele= implode(",",$_POST['ID_Dele']);
$SQL="delete from `user` where id in ($ID_Dele)";
http://www.dhdzp.com/article/6488.htm
您可能感興趣的文章:
- php批量刪除數(shù)據(jù)
- thinkphp框架實(shí)現(xiàn)刪除和批量刪除
- 基于ThinkPHP實(shí)現(xiàn)批量刪除
- php批量刪除操作代碼分享
- 使用php批量刪除數(shù)據(jù)庫下所有前綴為prefix_的表
- php批量刪除操作(數(shù)據(jù)訪問)
- PHP實(shí)現(xiàn)批量刪除(封裝)
- php批量添加數(shù)據(jù)與批量更新數(shù)據(jù)的實(shí)現(xiàn)方法
- PHP執(zhí)行批量mysql語句的解決方法
- Thinkphp批量更新數(shù)據(jù)的方法匯總
- PHP+JS實(shí)現(xiàn)批量刪除數(shù)據(jù)功能示例
相關(guān)文章
php中操作memcached緩存進(jìn)行增刪改查數(shù)據(jù)的實(shí)現(xiàn)代碼
這篇文章主要介紹了php中操作memcached緩存進(jìn)行增刪改查數(shù)據(jù)的實(shí)現(xiàn)代碼,需要的朋友可以參考下2014-08-08
php構(gòu)造方法中析構(gòu)方法在繼承中的表現(xiàn)
這篇文章主要為大家詳細(xì)介紹了php構(gòu)造方法中析構(gòu)方法在繼承中的表現(xiàn),感興趣的小伙伴們可以參考一下2016-04-04
php中強(qiáng)制下載文件的代碼(解決了IE下中文文件名亂碼問題)
以下這段代碼作用是:瀏覽器提交excel格式的數(shù)據(jù)和文件名到服務(wù)器上,PHP將請求轉(zhuǎn)化為可下載的excel文件,并要求瀏覽器彈出文件下載提示窗口2011-05-05
PHP實(shí)現(xiàn)根據(jù)時間戳獲取周幾的方法
這篇文章主要介紹了PHP實(shí)現(xiàn)根據(jù)時間戳獲取周幾的方法,涉及PHP針對時間與日期操作的相關(guān)技巧,具有一定參考借鑒價值,需要的朋友可以參考下2016-02-02

