From bfe1a4026027b1b87edb024d6499fe257fd01d19 Mon Sep 17 00:00:00 2001 From: AndreasK79 Date: Tue, 31 Mar 2020 07:43:33 +0200 Subject: [PATCH] Fixed a few bugs in the WAS award --- application/models/Logbook_model.php | 2 +- application/models/Was.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 80f4f5ec1..0e8400cfd 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -259,7 +259,7 @@ class Logbook_model extends CI_Model { $this->db->where('COL_STATE', $state); $this->db->where_in('COL_DXCC', ['291', '6', '110']); if($band != "SAT") { - $this->db->where('COL_BAND !=', 'SAT'); + $this->db->where('COL_PROP_MODE !=', 'SAT'); $this->db->where('COL_BAND', $band); } else { $this->db->where('COL_PROP_MODE', "SAT"); diff --git a/application/models/Was.php b/application/models/Was.php index 932c3abfa..451e342d9 100644 --- a/application/models/Was.php +++ b/application/models/Was.php @@ -74,10 +74,14 @@ class was extends CI_Model { $states = array(); // Used for keeping track of which states that are not worked + foreach ($stateArray as $state) { // Generating array for use in the table + $states[$state]['count'] = 0; // Inits each state's count + } + + foreach ($bands as $band) { foreach ($stateArray as $state) { // Generating array for use in the table $bandWas[$state][$band] = '-'; // Sets all to dash to indicate no result - $states[$state]['count'] = 0; // Inits each state's count } if ($postdata['worked'] != NULL) {