diff --git a/src/plugin/admin/app/common/Util.php b/src/plugin/admin/app/common/Util.php index 933bb84..848b0ff 100644 --- a/src/plugin/admin/app/common/Util.php +++ b/src/plugin/admin/app/common/Util.php @@ -370,7 +370,7 @@ class Util { Util::checkTableName($table); $database = config('database.connections')['plugin.admin.mysql']['database']; - $schema_raw = $section !== 'table' ? Util::db()->select("select * from information_schema.COLUMNS where TABLE_SCHEMA = '$database' and table_name = '$table'") : []; + $schema_raw = $section !== 'table' ? Util::db()->select("select * from information_schema.COLUMNS where TABLE_SCHEMA = '$database' and table_name = '$table' order by ORDINAL_POSITION") : []; $forms = []; $columns = []; foreach ($schema_raw as $item) {