## 數據刪除 delete() 返回受影響的數據行數
### 1. where 條件指定刪除
$m = D('user');
$where = ['id'=>10]; //where 條件指定要刪除的數據
$m->where($where)->delete();
### 2. 刪除所有記錄
**默認沒有 where 條件的情況下將不執行刪除操作,以免誤刪**
**確實需要刪除整個表的所有記錄時需要傳入參數 ALL**
$m = D('user');
$m->delete('ALL'); //傳入參數 ALL 來刪除所有數據
### 3. 多表關聯刪除
$m = D('user');
$where = ['a.id'=>10];
$join = 'LEFT JOIN cart b ON a.id=b.userid';
$m->alias('a')->join($join)->where($where)->delete('a,b'); //刪除a表和b表的關聯數據