From 1951bb7f29009eef83d70e5ddbd0f74603869950 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sat, 2 Aug 2025 22:57:26 +0100 Subject: [PATCH] Fix VUCC grids query to match substring correctly Updated the query to use or_like on COL_VUCC_GRIDS instead of applying SUBSTRING, ensuring proper matching of the grid prefix. This resolves issues with grid searches not returning expected results. --- application/models/Logbook_model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 0b7e394d..eb7ec02d 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2079,7 +2079,7 @@ class Logbook_model extends CI_Model $this->db->where_in('station_id', $logbooks_locations_array); $this->db->group_start(); $this->db->like('SUBSTRING(COL_GRIDSQUARE, 1, 4)', substr($grid, 0, 4)); - $this->db->or_like('SUBSTRING(COL_VUCC_GRIDS, 1, 4)', substr($grid, 0, 4)); + $this->db->or_like('COL_VUCC_GRIDS', substr($grid, 0, 4)); $this->db->group_end(); if ($band != null && $band != 'SAT') {