From 5f39e99d4748f04e51e312124176548af6668692 Mon Sep 17 00:00:00 2001 From: Thomas Werzmirzowsky Date: Wed, 20 Oct 2021 21:26:35 +0200 Subject: [PATCH] sort logbook and station list by name --- application/models/Logbooks_model.php | 1 + application/models/Stations.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/application/models/Logbooks_model.php b/application/models/Logbooks_model.php index a5d44266..8eb13871 100644 --- a/application/models/Logbooks_model.php +++ b/application/models/Logbooks_model.php @@ -11,6 +11,7 @@ class Logbooks_model extends CI_Model { function show_all() { $this->db->where('user_id', $this->session->userdata('user_id')); + $this->db->order_by('logbook_name'); return $this->db->get('station_logbooks'); } diff --git a/application/models/Stations.php b/application/models/Stations.php index ec9cc4ef..5c2869cb 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -15,7 +15,8 @@ class Stations extends CI_Model { $this->db->join($this->config->item('table_name'),'station_profile.station_id = '.$this->config->item('table_name').'.station_id','left'); $this->db->group_by('station_profile.station_id'); $this->db->where('station_profile.user_id', $this->session->userdata('user_id')); - $this->db->or_where('station_profile.user_id =', NULL); + $this->db->or_where('station_profile.user_id =', NULL); + $this->db->order_by('station_profile.station_profile_name'); return $this->db->get(); }