Put bindings to the right place

This commit is contained in:
phl0
2026-02-20 12:37:44 +01:00
parent 79fd02e469
commit 82a1fdfa50

View File

@@ -190,6 +190,7 @@ class API_Model extends CI_Model {
$logbooks_locations_array = $StationLocationsArray;
}
$bindings = [];
$subsql = '';
$band = ($band == 'All') ? null : $band;
if ($band != null && $band != 'SAT') {
@@ -210,7 +211,6 @@ class API_Model extends CI_Model {
break;
}
$bindings = [];
$ids = array_map('intval', $logbooks_locations_array);
$sql = 'SELECT DISTINCT UPPER(SUBSTR(COL_GRIDSQUARE, 1, 4)) AS gridsquare FROM ' . $this->config->item('table_name') . ' thcv ';
$sql .= ' WHERE COL_GRIDSQUARE <> "" AND CHAR_LENGTH(COL_GRIDSQUARE) >= 4';