From 77a63d16b0064c0f85f25f7051c504177b272cba Mon Sep 17 00:00:00 2001 From: phl0 Date: Fri, 13 May 2022 21:00:10 +0200 Subject: [PATCH] Replace REGEXP_LIKE in DOK stats --- application/models/Dok.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Dok.php b/application/models/Dok.php index 50a4a265..0700791e 100644 --- a/application/models/Dok.php +++ b/application/models/Dok.php @@ -16,9 +16,9 @@ class DOK extends CI_Model { $location_list = "'".implode("','",$logbooks_locations_array)."'"; $sql = "select upper(COL_DARC_DOK) as COL_DARC_DOK, COL_MODE, lcase(COL_BAND) as COL_BAND, count(COL_DARC_DOK) as cnt from ".$this->config->item('table_name')." WHERE station_id in (" . $location_list . ") AND COL_DARC_DOK IS NOT NULL AND COL_DARC_DOK != '' AND COL_DXCC = 230"; if ($postdata['doks'] == 'dok') { - $sql .= " AND REGEXP_LIKE (COL_DARC_DOK, '^[A-Z][0-9]{2}$')"; + $sql .= " AND COL_DARC_DOK REGEXP '^[A-Z][0-9]{2}$'"; } else if ($postdata['doks'] == 'sdok') { - $sql .= " AND NOT REGEXP_LIKE (COL_DARC_DOK, '^[A-Z][0-9]{2}$')"; + $sql .= " AND COL_DARC_DOK NOT REGEXP '^[A-Z][0-9]{2}$'"; } $sql .= " group by COL_DARC_DOK, COL_MODE, COL_BAND"; $sql .= " order by COL_DARC_DOK asc";