From 374d2fe59c6149067db84a05b0fd31edae9702a7 Mon Sep 17 00:00:00 2001 From: walkor Date: Thu, 23 Feb 2023 12:45:14 +0800 Subject: [PATCH] update --- src/plugin/admin/app/controller/TableController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin/admin/app/controller/TableController.php b/src/plugin/admin/app/controller/TableController.php index df699ab..66ee09a 100644 --- a/src/plugin/admin/app/controller/TableController.php +++ b/src/plugin/admin/app/controller/TableController.php @@ -555,7 +555,7 @@ class TableController extends Base try { $database = config('database.connections')['plugin.admin.mysql']['database']; //plugin.admin.mysql - foreach (Util::db()->select("select COLUMN_NAME,DATA_TYPE,COLUMN_KEY,COLUMN_COMMENT from INFORMATION_SCHEMA.COLUMNS where table_name = '$table' and table_schema = '$database'") as $item) { + foreach (Util::db()->select("select COLUMN_NAME,DATA_TYPE,COLUMN_KEY,COLUMN_COMMENT from INFORMATION_SCHEMA.COLUMNS where table_name = '$table' and table_schema = '$database' order by ORDINAL_POSITION") as $item) { if ($item->COLUMN_KEY === 'PRI') { $pk = $item->COLUMN_NAME; $item->COLUMN_COMMENT .= "(主键)";