[Awards] Fixed implode error when logbook is empty

This commit is contained in:
Andreas
2021-11-14 17:11:59 +01:00
parent 914333693c
commit 8c7fa355fb
16 changed files with 121 additions and 10 deletions

View File

@@ -27,6 +27,10 @@ class Counties extends CI_Model
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
}
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$sql = "select count(distinct COL_CNTY) countycountworked, coalesce(x.countycountconfirmed, 0) countycountconfirmed, thcv.COL_STATE
@@ -75,6 +79,10 @@ class Counties extends CI_Model
$CI->load->model('logbooks_model');
$logbooks_locations_array = $CI->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if (!$logbooks_locations_array) {
return null;
}
$location_list = "'".implode("','",$logbooks_locations_array)."'";
$sql = "select distinct COL_CNTY, COL_STATE