Merge pull request #16 from Chance-fyi/main
select COLUMNS order by ORDINAL_POSITION
This commit is contained in:
commit
d8e5dcff50
@ -370,7 +370,7 @@ class Util
|
|||||||
{
|
{
|
||||||
Util::checkTableName($table);
|
Util::checkTableName($table);
|
||||||
$database = config('database.connections')['plugin.admin.mysql']['database'];
|
$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 = [];
|
$forms = [];
|
||||||
$columns = [];
|
$columns = [];
|
||||||
foreach ($schema_raw as $item) {
|
foreach ($schema_raw as $item) {
|
||||||
|
Loading…
Reference in New Issue
Block a user