mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 07:11:19 +08:00
This commit is contained in:

committed by
Alexander Makarov

parent
31eadebe43
commit
6b10bbcec2
@ -177,8 +177,12 @@ FROM [INFORMATION_SCHEMA].[TABLES] AS [t]
|
|||||||
WHERE [t].[table_schema] = :schema AND [t].[table_type] IN ('BASE TABLE', 'VIEW')
|
WHERE [t].[table_schema] = :schema AND [t].[table_type] IN ('BASE TABLE', 'VIEW')
|
||||||
ORDER BY [t].[table_name]
|
ORDER BY [t].[table_name]
|
||||||
SQL;
|
SQL;
|
||||||
|
$tables = $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
|
||||||
|
$tables = array_map(static function ($item) {
|
||||||
|
return '[' . $item . ']';
|
||||||
|
}, $tables);
|
||||||
|
|
||||||
return $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();
|
return $tables;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user