diff --git a/application/controllers/Debug.php b/application/controllers/Debug.php index 229e0306f..97e24a274 100644 --- a/application/controllers/Debug.php +++ b/application/controllers/Debug.php @@ -26,6 +26,8 @@ class Debug extends CI_Controller $footerData['scripts'] = ['assets/js/sections/debug.js']; $data['stations'] = $this->Stations->all(); + + $data['qso_total'] = $this->Logbook_model->count_all_qso(); $data['qsos_with_no_station_id'] = $this->Logbook_model->check_for_station_id(); if ($data['qsos_with_no_station_id']) { diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 7654393ed..dd44deed3 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1773,6 +1773,13 @@ class Logbook_model extends CI_Model { } } + // returns the number of qso's total on this instance + function count_all_qso() { + $sql = 'SELECT COUNT(*) AS total FROM '. $this->config->item('table_name').' WHERE station_id IS NOT NULL;'; + $query = $this->db->query($sql); + return $query->row()->total; + } + /* * Function returns the QSOs from the logbook, which have not been either marked as uploaded to hrdlog, or has been modified with an edit */ diff --git a/application/views/debug/index.php b/application/views/debug/index.php index cf891f0a0..67ef0ef66 100644 --- a/application/views/debug/index.php +++ b/application/views/debug/index.php @@ -43,7 +43,14 @@