From 3def0a3180650b0b9ee4ac8208da8ab8db0fa504 Mon Sep 17 00:00:00 2001 From: Thomas Werzmirzowsky Date: Fri, 18 Mar 2022 20:59:18 +0100 Subject: [PATCH] added missing join to station_profile to DOK award show qsos dialog --- application/controllers/Awards.php | 1 + application/models/Api_model.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/application/controllers/Awards.php b/application/controllers/Awards.php index b3b1200a..e5c2fd38 100644 --- a/application/controllers/Awards.php +++ b/application/controllers/Awards.php @@ -64,6 +64,7 @@ class Awards extends CI_Controller { $arguments["format"] = "json"; $arguments["limit"] = ''; $arguments["order"] = ''; + $arguments["join_station_profile"] = true; // print_r($arguments); // return; diff --git a/application/models/Api_model.php b/application/models/Api_model.php index 93b8776e..435869b3 100644 --- a/application/models/Api_model.php +++ b/application/models/Api_model.php @@ -250,6 +250,9 @@ class API_Model extends CI_Model { // Append the table we're pulling data from $q .= "FROM ".$this->config->item('table_name'); + if (isset($arguments["join_station_profile"]) && $arguments["join_station_profile"]) { + $q .= " INNER JOIN station_profile ON ".$this->config->item('table_name').".station_id = station_profile.station_id"; + } // Parse the 'query' string, which is converted into a standard MySQL 'WHERE' // clause.