From 24f3b3397c206f53b6995377d776ee01e0d92b72 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 19 Jun 2024 14:34:31 +0100 Subject: [PATCH] [API] When looking up a grid only do first 4 chars --- application/models/Logbook_model.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 61f3129b..b365038b 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -2037,6 +2037,9 @@ class Logbook_model extends CI_Model $logbooks_locations_array = $StationLocationsArray; } + // Only take the first 4 characters of the grid + $grid = substr($grid, 0, 4); + $this->db->select('COL_GRIDSQUARE'); $this->db->where_in('station_id', $logbooks_locations_array); $this->db->group_start();