From 89592ff63814bc6a1cf6d39794dccf7cb92571c0 Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 13 Dec 2023 18:07:39 +0800 Subject: [PATCH] eee --- ActiveQuery.php | 4 ++-- SqlBuilder.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ActiveQuery.php b/ActiveQuery.php index 25cbf21..7d2594b 100644 --- a/ActiveQuery.php +++ b/ActiveQuery.php @@ -181,9 +181,9 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder */ public function insert(array $data): bool { - [$sql, $params] = $this->builder->insert($data, isset($data[0])); + $sql = $this->builder->insert($data, isset($data[0])); - return (bool)$this->buildCommand($sql, $params)->exec(); + return (bool)$this->buildCommand($sql)->exec(); } /** diff --git a/SqlBuilder.php b/SqlBuilder.php index 98a75fd..d10f922 100644 --- a/SqlBuilder.php +++ b/SqlBuilder.php @@ -119,7 +119,7 @@ class SqlBuilder extends Component * @return array * @throws */ - public function insert(array $attributes, bool $isBatch = false): array + public function insert(array $attributes, bool $isBatch = false): string { $update = 'INSERT INTO ' . $this->query->from; if ($isBatch === false) { @@ -133,7 +133,7 @@ class SqlBuilder extends Component $keys[] = implode(',', $_keys); } - return [$update . '(' . implode('),(', $keys) . ')', $this->query->params]; + return $update . '(' . implode('),(', $keys) . ')'; }