diff --git a/application/models/Distancerecords_model.php b/application/models/Distancerecords_model.php index e614591be..2f1d19a38 100644 --- a/application/models/Distancerecords_model.php +++ b/application/models/Distancerecords_model.php @@ -88,7 +88,9 @@ class Distancerecords_model extends CI_Model { public function sat_distances($sat){ $this->load->model('logbooks_model'); $logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook')); + $this->db->select('*, satellite.displayname AS sat_displayname'); $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); + $this->db->join('satellite', 'satellite.name = '.$this->config->item('table_name').'.COL_SAT_NAME'); $this->db->where('COL_SAT_NAME', $sat); $this->db->where_in($this->config->item('table_name').'.station_id', $logbooks_locations_array); $this->db->order_by("COL_DISTANCE", "desc");