eee
This commit is contained in:
+9
-2
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user