From 6b4c85cd62aae142ac6ea8fd7665ddbefdf5f2f1 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sun, 8 Mar 2020 21:50:55 +0000 Subject: [PATCH] Distance plots only shown for the active station profile not all qsos in the database table --- application/models/Distances_model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/Distances_model.php b/application/models/Distances_model.php index c8025898..a6da9d68 100644 --- a/application/models/Distances_model.php +++ b/application/models/Distances_model.php @@ -14,6 +14,7 @@ class Distances_model extends CI_Model $CI =& get_instance(); $CI->load->model('Stations'); $station_id = $CI->Stations->find_active(); + $station_gridsquare = $CI->Stations->find_gridsquare(); $gridsquare = explode(',', $station_gridsquare); // We need to convert to an array, since a user can enter several gridsquares @@ -26,7 +27,7 @@ class Distances_model extends CI_Model else { $this->db->where('col_band', $postdata['band']); } - + $this->db->where('station_id', $station_id); $dataarrayata = $this->db->get($this->config->item('table_name')); $this->plot($dataarrayata->result_array(), $gridsquare); }