Replace REGEXP_LIKE in DOK stats

pull/1478/head
phl0 2022-05-13 21:00:10 +02:00
rodzic 602320585a
commit 77a63d16b0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 48EA1E640798CA9A
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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";