From dc7d941e65a6ff051b5f22f2fc524a9ffadd17e6 Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 20 Feb 2026 11:36:36 +0100 Subject: [PATCH] Only use grids with length of at least 4 chars --- application/models/Logbook_model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 3dee7f9af..b2c79c9ad 100644 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -3346,7 +3346,8 @@ class Logbook_model extends CI_Model { $bindings = []; $sql = 'SELECT DISTINCT UPPER(SUBSTR(COL_GRIDSQUARE, 1, 4)) AS gridsquare FROM ' . $this->config->item('table_name') . ' thcv '; - $sql .= ' WHERE COL_GRIDSQUARE <> "" AND station_id IN ('.implode(',', $logbooks_locations_array).')'; + $sql .= ' WHERE COL_GRIDSQUARE <> "" AND CHAR_LENGTH(COL_GRIDSQUARE) >= 4'; + $sql .= ' AND station_id IN ('.implode(',', $logbooks_locations_array).')'; $band = ($band == 'All') ? null : $band; if ($band != null && $band != 'SAT') { $sql .= ' AND COL_BAND = ? AND COL_PROP_MODE != "SAT"';