选择语言 :

 Module_Database::delete

删除数据

integer Module_Database::delete( [ string $table = null , array $where = null ] )

参数列表

参数 类型 描述 默认值
$table string 表名称 null
$where array 条件 null
返回值
  • integer 操作行数
File: ./modules/database/database.class.php
public function delete($table = null, $where = null)
{
    if ($table)
    {
        $this->table($table);
    }
    if ($where)
    {
        $this->where($where);
    }
    $sql = $this->compile('delete');

    return $this->query($sql , false , true);
}