From 42db5c83dc93e192f1ef2964ee02e947a136254e Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 3 Jul 2021 16:16:45 +0800 Subject: [PATCH] modify --- Database/Base/BaseActiveRecord.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 42639c60..f7c41d5f 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -734,16 +734,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 = $tablePrefix . $table; } - return '`' . static::getDbName() . '`' . $table; + return '`' . static::getDbName() . '`.' . $table; }