replace 替换
优质
小牛编辑
143浏览
2023-12-01
replace
将新的数据替换旧的数据(个人认为非常难用...)
replace($table, $column, $where)table [string]
表名.
columns [string/array]
The target columns of data will be replaced.
where (optional) [array]
The WHERE clause to filter records.
$database->replace("account", [ "type" => [ "user" => "new_user", "business" => "new_business" ], "column" => [ "old_value" => "new_value" ]], [ "user_id[>]" => 1000]);