diff --git a/src/Medoo.php b/src/Medoo.php index c3ee6813..b8cb0302 100644 --- a/src/Medoo.php +++ b/src/Medoo.php @@ -604,7 +604,7 @@ protected function generate(string $statement, array $map): string foreach ($map as $key => $value) { if ($value[1] === PDO::PARAM_STR) { - $replace = $this->quote($value[0]); + $replace = $this->quote("{$value[0]}"); } elseif ($value[1] === PDO::PARAM_NULL) { $replace = 'NULL'; } elseif ($value[1] === PDO::PARAM_LOB) { diff --git a/tests/UpdateTest.php b/tests/UpdateTest.php index c7c7112b..389cadf7 100644 --- a/tests/UpdateTest.php +++ b/tests/UpdateTest.php @@ -21,6 +21,7 @@ public function testUpdate($type) $this->database->update("account", [ "type" => "user", + "money" => 23.2, "age[+]" => 1, "level[-]" => 5, "score[*]" => 2, @@ -37,6 +38,7 @@ public function testUpdate($type) 'default' => << <<database->queryString);