Files
wavelog/application/models/Wwff.php
2026-03-18 09:00:48 +01:00

29 lines
690 B
PHP

<?php
class Wwff extends CI_Model {
function get_all() {
$this->load->model('logbooks_model');
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
if ($logbooks_locations_array[0] === -1) {
return null;
}
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('wwff');
if(!$bandslots) return null;
$this->db->where_in("station_id", $logbooks_locations_array);
$this->db->where_in("col_band", $bandslots);
$this->db->order_by("COL_WWFF_REF", "ASC");
$this->db->where('COL_WWFF_REF !=', '');
return $this->db->get($this->config->item('table_name'));
}
}
?>