diff --git a/application/models/Stations.php b/application/models/Stations.php index a5d4cd07..bb9bdd1d 100644 --- a/application/models/Stations.php +++ b/application/models/Stations.php @@ -9,7 +9,12 @@ class Stations extends CI_Model { } function all() { - return $this->db->get('station_profile'); + + $this->db->select('station_profile.*, count('.$this->config->item('table_name').'.station_id) as qso_total'); + $this->db->from('station_profile'); + $this->db->join($this->config->item('table_name'),'station_profile.station_id = '.$this->config->item('table_name').'.station_id','left'); + $this->db->group_by('station_profile.station_id'); + return $this->db->get(); } function profile($id) { diff --git a/application/views/station_profile/index.php b/application/views/station_profile/index.php index efd9b91b..df4aec67 100644 --- a/application/views/station_profile/index.php +++ b/application/views/station_profile/index.php @@ -42,6 +42,7 @@