选择语言 :

 Module_Database::update

更新数据

int Module_Database::update( [ string $table = null , array $value = null , array $where = null ] )

参数列表

参数 类型 描述 默认值
$table string $table null
$value array $value null
$where array $where null
返回值
  • int 作用的行数
File: ./modules/database/database.class.php
public function update($table = null, $value = null, $where = null)
{
    if ($table)
    {
        $this->table($table);
    }
    if ($value)
    {
        $this->set($value);
    }
    if ($where)
    {
        $this->where($where);
    }
    $sql = $this->compile('update');

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