This commit is contained in:
as2252258@163.com
2021-07-03 16:16:45 +08:00
parent c439e9949c
commit 42db5c83dc
+3 -3
View File
@@ -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;
}