This commit is contained in:
2026-06-30 23:06:55 +08:00
parent 9b0ee54608
commit b7e59d1c96
+9 -2
View File
@@ -75,7 +75,13 @@ class SqlBuilder extends Component
*/
public function update(array $attributes): bool|string
{
return $this->__updateBuilder($this->makeParams($attributes));
$params = $this->query->params;
$this->query->params = [];
$array = $this->makeParams($attributes);
foreach ($array as $name => $value) {
$this->query->pushParam($value);
}
return $this->__updateBuilder($array);
}
@@ -153,7 +159,8 @@ class SqlBuilder extends Component
* @param $attributes
* @return array
*/
#[Pure] private function getFields(array $attributes): array
#[Pure]
private function getFields(array $attributes): array
{
return array_keys(current($attributes));
}