diff --git a/application/models/Contesting_model.php b/application/models/Contesting_model.php index 6d5c2784..7e6dc3f2 100644 --- a/application/models/Contesting_model.php +++ b/application/models/Contesting_model.php @@ -197,7 +197,7 @@ class Contesting_model extends CI_Model { $station_id = $CI->Stations->find_active(); $sql = "select col_contest_id, min(date(col_time_on)) mindate, max(date(col_time_on)) maxdate, year(col_time_on) year, month(col_time_on) month - from logbook l + from " . $this->config->item('table_name') . " where coalesce(COL_CONTEST_ID, '') <> '' and station_id =" . $station_id; @@ -214,7 +214,7 @@ class Contesting_model extends CI_Model { $station_id = $CI->Stations->find_active(); $sql = "select distinct year(col_time_on) year - from logbook l + from " . $this->config->item('table_name') . " where coalesce(COL_CONTEST_ID, '') <> '' and station_id =" . $station_id; @@ -233,7 +233,7 @@ class Contesting_model extends CI_Model { $station_id = $CI->Stations->find_active(); $sql = "select distinct col_contest_id - from logbook l + from " . $this->config->item('table_name') . " where coalesce(COL_CONTEST_ID, '') <> '' and station_id =" . $station_id . " and year(col_time_on) ='" . $year . "'"; @@ -254,7 +254,7 @@ class Contesting_model extends CI_Model { $station_id = $CI->Stations->find_active(); $sql = "select min(date(col_time_on)) mindate, max(date(col_time_on)) maxdate - from logbook l + from " . $this->config->item('table_name') . " where coalesce(COL_CONTEST_ID, '') <> '' and station_id =" . $station_id . " and year(col_time_on) ='" . $year . "' and col_contest_id ='" . $contestid . "'";