Get Started

Where Syntax

Query

Transaction

Advanced

PDO object

Debug

Information

version: 1.1.3

replace

Replace old data into new one

replace($table, $column, $search, $replace, $where)
replace($table, $column, $replacement, $where)
replace($table, $columns, $where)
Return: [number] The number of rows affected.
$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
]);