Allow for displaying subdivision names

This commit is contained in:
phl0
2024-01-09 17:07:25 +01:00
parent a8c606e534
commit 810297ba39
2 changed files with 3 additions and 2 deletions

View File

@@ -1653,13 +1653,14 @@ class Logbook_model extends CI_Model {
function get_qso($id, $trusted = false) {
if ($trusted || ($this->logbook_model->check_qso_is_accessible($id))) {
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload');
$this->db->select($this->config->item('table_name').'.*, station_profile.*, dxcc_entities.*, coalesce(dxcc_entities_2.name, "- NONE -") as station_country, dxcc_entities_2.end as station_end, eQSL_images.image_file as eqsl_image_file, lotw_users.callsign as lotwuser, lotw_users.lastupload, primary_subdivisions.subdivision');
$this->db->from($this->config->item('table_name'));
$this->db->join('dxcc_entities', $this->config->item('table_name').'.col_dxcc = dxcc_entities.adif', 'left');
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id', 'left');
$this->db->join('dxcc_entities as dxcc_entities_2', 'station_profile.station_dxcc = dxcc_entities_2.adif', 'left outer');
$this->db->join('eQSL_images', $this->config->item('table_name').'.COL_PRIMARY_KEY = eQSL_images.qso_id', 'left outer');
$this->db->join('lotw_users', $this->config->item('table_name').'.COL_CALL = lotw_users.callsign', 'left outer');
$this->db->join('primary_subdivisions', $this->config->item('table_name').'.COL_STATE = primary_subdivisions.state', 'left outer');
$this->db->where('COL_PRIMARY_KEY', $id);
return $this->db->get();

View File

@@ -175,7 +175,7 @@
<?php if($row->COL_STATE != null) { ?>
<tr>
<td><?php echo $primary_subdivision ?>:</td>
<td><?php echo $row->COL_STATE; ?></td>
<td><?php echo $row->subdivision.' ('.$row->COL_STATE.')'; ?></td>
</tr>
<?php } ?>