version: 2.2.0
replace
Replace old data with a new one
replace($table, $columns, $where)
table [string]
The table name.
columns [array]
The target columns of data will be replaced.
where (optional) [array]
The WHERE clause to filter records.
Return: [PDOStatement] The PDOStatement object.
$database->replace("account", [
"type" => [
"user" => "new_user",
"business" => "new_business"
],
"column" => [
"old_value" => "new_value"
]
], [
"user_id[>]" => 1000
]);