Query fix on not worked

This commit is contained in:
Andreas Kristiansen
2024-12-22 08:45:48 +01:00
parent 9ed0720ea4
commit 970685f0c9

View File

@@ -368,7 +368,12 @@ class WAE extends CI_Model {
$bindings[]=$postdata['mode'];
}
$sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id in (". $location_list .") and col_dxcc = thcv.col_dxcc and col_dxcc > 0";
$sql .= " and not exists (select 1 from ".$this->config->item('table_name')." where station_id in (". $location_list .") and col_dxcc = thcv.col_dxcc";
if ($wae) {
$sql .= ' and col_dxcc in ( '. $this->waecountries . ') and col_region in ('. $this->region.')';
} else {
$sql .= " and col_dxcc in ( ". $this->eucountries . ") and coalesce(col_region, '') = ''";
}
$sql .= $this->genfunctions->addBandToQuery($postdata['band'],$bindings);