数据删除

简单数据删除

$this->db()->delete('user-id-1');

////特别指定表前缀为u_(假设配置中配置的不为u_)v2.6.5起可用 id=1 and status = 1
$this->db()->delete('user-id-1-status-1', and, 'u_');

多个条件

$this->db()->where('id', 1)
    ->where('status', 1)
    ->delete('user');

或者

$this->db()->table('user')
    ->where('id', 1)
    ->where('status', 1)
    ->delete();

results matching ""

    No results matching ""