mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-21 22:55:36 +00:00
refactor:公共函数 get_table_list 默认不再去除后缀的表
字
This commit is contained in:
parent
b16ba81d0e
commit
6a41d97e5e
@ -18,7 +18,7 @@ if (!function_exists('get_table_list')) {
|
||||
$database = config('database.connections.mysql.database');
|
||||
$tables = Db::query("SELECT TABLE_NAME,TABLE_COMMENT FROM information_schema.TABLES WHERE table_schema = ? ", [$database]);
|
||||
foreach ($tables as $row) {
|
||||
$tableList[$row['TABLE_NAME']] = $row['TABLE_NAME'] . ($row['TABLE_COMMENT'] ? ' - ' . str_replace('表', '', $row['TABLE_COMMENT']) : '');
|
||||
$tableList[$row['TABLE_NAME']] = $row['TABLE_NAME'] . ($row['TABLE_COMMENT'] ? ' - ' . $row['TABLE_COMMENT'] : '');
|
||||
}
|
||||
return $tableList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user