[API] When looking up a grid only do first 4 chars

This commit is contained in:
Peter Goodhall 2024-06-19 14:34:31 +01:00
parent ccb9f592b3
commit 24f3b3397c

View File

@ -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();