diff --git a/application/models/Adif_data.php b/application/models/Adif_data.php index 6918070c..cdc2f49c 100644 --- a/application/models/Adif_data.php +++ b/application/models/Adif_data.php @@ -23,11 +23,12 @@ class adif_data extends CI_Model { $this->load->model('stations'); $active_station_id = $this->stations->find_active(); - $this->db->where('station_id', $active_station_id); + $this->db->where($this->config->item('table_name').'.station_id', $active_station_id); + $this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id'); $this->db->where_in('COL_QSL_SENT', array('R', 'Q')); - $this->db->order_by("COL_TIME_ON", "ASC"); + $this->db->order_by("COL_TIME_ON", "ASC"); $query = $this->db->get($this->config->item('table_name')); - + return $query; }