From f0c6006f2ff754f299b4dc658425bf9761ba8593 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Thu, 7 Sep 2023 13:35:29 +0100 Subject: [PATCH] Update Logbook_model.php --- application/models/Logbook_model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 5a5cf093..fa0eda3f 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1467,6 +1467,9 @@ class Logbook_model extends CI_Model { $this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, lotw_users.callsign, lotw_users.lastupload'); $this->db->from($this->config->item('table_name')); + // remove anything thats duplicated based on COL_PRIMARY_KEY + $this->db->distinct(''.$this->config->item('table_name').'.COL_PRIMARY_KEY'); + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left'); $this->db->join('lotw_users', 'lotw_users.callsign = '.$this->config->item('table_name').'.col_call', 'left outer');