mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Added mode in the result table
This commit is contained in:
@@ -929,6 +929,40 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
$sql = "select thcv.col_call, thcv.col_time_on, thcv.col_band, thcv.col_mode, thcv.col_submode, thcv.col_primary_key FROM ". $this->config->item('table_name') . " thcv";
|
||||
|
||||
$sql .= " join (SELECT col_call, min(col_time_on) firstworked, col_band, min(col_primary_key) qsoid FROM ".$this->config->item('table_name');
|
||||
|
||||
$sql .= " where station_id in (" . implode(',',$logbooks_locations_array) . ") and col_prop_mode ='EME'";
|
||||
|
||||
if ($mode != 'All') {
|
||||
$sql .= " and (col_mode = ? or col_submode = ?)";
|
||||
$binding[] = $mode;
|
||||
$binding[] = $mode;
|
||||
}
|
||||
|
||||
if ($band != 'All') {
|
||||
$sql .= " and col_band = ?";
|
||||
$binding[] = $band;
|
||||
}
|
||||
|
||||
$sql .= " group by col_call, col_band order by firstworked) x on thcv.col_primary_key = x.qsoid";
|
||||
|
||||
$result = $this->db->query($sql, $binding);
|
||||
|
||||
return $result->result();
|
||||
}
|
||||
|
||||
public function getInitialsFromDb2($band, $mode) {
|
||||
$binding = [];
|
||||
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
|
||||
if (!$logbooks_locations_array) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$sql = "SELECT col_call, min(col_time_on) firstworked, col_band, min(col_primary_key) qsoid FROM ".$this->config->item('table_name');
|
||||
|
||||
$sql .= " where station_id in (" . implode(',',$logbooks_locations_array) . ") and col_prop_mode ='EME'";
|
||||
|
||||
Reference in New Issue
Block a user