更新数据
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
作用的行数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);
}