From 12766a3b74874ebd385a6cf109b66b950989a53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 6 Jul 2021 18:00:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/Base/BaseActiveRecord.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index cf6b2621..5703f782 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -735,16 +735,16 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess } if (str_starts_with($table, $tablePrefix)) { - return '`' . static::getDbName() . '`' . $table; + return '`' . static::getDbName() . '`.' . $table; } else if (!str_starts_with($table, '{{%')) { - return '`' . static::getDbName() . '`' . $table; + return '`' . static::getDbName() . '`.' . $table; } $table = trim($table, '{{%}}'); if ($tablePrefix) { - $table = '`' . static::getDbName() . '`' . $tablePrefix . $table; + $table = '`' . static::getDbName() . '`.' . $tablePrefix . $table; } - return '`' . static::getDbName() . '`' . $table; + return '`' . static::getDbName() . '`.' . $table; }