From aea84a32fc71efc8dc0c107b142786fd08bf6b08 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 9 Aug 2018 13:51:33 -0400 Subject: [PATCH] Order the options by how they were added. Use id for order by. --- models/admin/entity/fields.php | 2 +- models/admin/management/fields.php | 2 +- setup/adminHooks.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/admin/entity/fields.php b/models/admin/entity/fields.php index ea4f9f4..910bea1 100644 --- a/models/admin/entity/fields.php +++ b/models/admin/entity/fields.php @@ -187,7 +187,7 @@ class GlmMembersAdmin_entity_fields extends GlmDataFieldsCustomFields "SELECT * FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_options WHERE field_id = %d - ORDER BY option_text", + ORDER BY id", $field['id'] ), ARRAY_A diff --git a/models/admin/management/fields.php b/models/admin/management/fields.php index d0c7588..a727387 100644 --- a/models/admin/management/fields.php +++ b/models/admin/management/fields.php @@ -430,7 +430,7 @@ class GlmMembersAdmin_management_fields extends GlmDataFieldsCustomFields "SELECT * FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_options WHERE field_id = %d - ORDER BY option_text", + ORDER BY id", $field['id'] ), ARRAY_A diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 053d3cf..3c08f3b 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -151,7 +151,7 @@ $parts = array(); "SELECT * FROM " . GLM_MEMBERS_FIELDS_PLUGIN_DB_PREFIX . "custom_field_options WHERE field_id = %d - ORDER BY option_text", + ORDER BY id", $field['id'] ), ARRAY_A -- 2.17.1