Cloudlog/application/models/Wwff.php

30 wiersze
717 B
PHP
Czysty Zwykły widok Historia

2022-09-10 13:04:05 +00:00
<?php
class Wwff extends CI_Model {
function get_all() {
$CI =& get_instance();
$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;
}
2022-09-20 15:25:50 +00:00
$this->load->model('bands');
$bandslots = $this->bands->get_worked_bands('wwff');
if(!$bandslots) return null;
2022-09-10 13:04:05 +00:00
$this->db->where_in("station_id", $logbooks_locations_array);
2022-09-20 15:25:50 +00:00
$this->db->where_in("col_band", $bandslots);
2022-09-10 13:04:05 +00:00
$this->db->order_by("COL_WWFF_REF", "ASC");
$this->db->where('COL_WWFF_REF !=', '');
return $this->db->get($this->config->item('table_name'));
}
}
?>