From 853fd10f0588dbc9be22a97685840889d675bcb4 Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Wed, 26 Jun 2024 14:51:20 +0200 Subject: [PATCH] Fixed dropdown --- application/models/Distances_model.php | 16 +++++++++------- application/views/distances/index.php | 1 + 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/application/models/Distances_model.php b/application/models/Distances_model.php index 8d4e77850..1f80308b4 100644 --- a/application/models/Distances_model.php +++ b/application/models/Distances_model.php @@ -28,14 +28,16 @@ class Distances_model extends CI_Model $this->db->join('satellite', 'satellite.name = '.$this->config->item('table_name').'.COL_SAT_NAME', 'left outer'); $this->db->where('LENGTH(col_gridsquare) >', 0); - if ($postdata['band'] == 'sat') { - $this->db->where('col_prop_mode', $postdata['band']); - if ($postdata['sat'] != 'All') { - $this->db->where('col_sat_name', $postdata['sat']); + if ($postdata['band'] != 'All') { + if ($postdata['band'] == 'sat') { + $this->db->where('col_prop_mode', $postdata['band']); + if ($postdata['sat'] != 'All') { + $this->db->where('col_sat_name', $postdata['sat']); + } + } + else { + $this->db->where('col_band', $postdata['band']); } - } - else { - $this->db->where('col_band', $postdata['band']); } if ($postdata['orbit'] != 'All') { diff --git a/application/views/distances/index.php b/application/views/distances/index.php index 4becc753f..ca4845785 100644 --- a/application/views/distances/index.php +++ b/application/views/distances/index.php @@ -18,6 +18,7 @@