Medoo

开始

Where 语句

查询

Transaction

原生SQL查询

PDO object

Debug

数据库信息

replace

将新的数据替换旧的数据

replace($table, $column, $search, $replace, $where)
replace($table, $column, $replacement, $where)
replace($table, $columns, $where)
Return: [number] 返回受影响的行数
$database->replace("account", "type", "user", "new_user", [
    "user_id[>]" => 1000
]);

$database->replace("account", "type", [
    "user" => "new_user",
    "business" => "new_business"
], [
    "user_id[>]" => 1000
]);

$database->replace("account", [
    "type" => [
        "user" => "new_user",
        "business" => "new_business"
    ],
    "group" => [
        "groupA" => "groupB"
    ]
], [
    "user_id[>]" => 1000
]);