mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Moved function from logbook_model to distancerecords_model
This commit is contained in:
@@ -74,6 +74,19 @@ class Distancerecords_model extends CI_Model {
|
||||
}
|
||||
return($result);
|
||||
}
|
||||
|
||||
public function sat_distances($sat){
|
||||
$this->load->model('logbooks_model');
|
||||
$logbooks_locations_array = $this->logbooks_model->list_logbook_relationships($this->session->userdata('active_station_logbook'));
|
||||
$this->db->join('station_profile', 'station_profile.station_id = '.$this->config->item('table_name').'.station_id');
|
||||
$this->db->where('COL_SAT_NAME', $sat);
|
||||
$this->db->where_in($this->config->item('table_name').'.station_id', $logbooks_locations_array);
|
||||
$this->db->order_by("COL_DISTANCE", "desc");
|
||||
$this->db->limit(500);
|
||||
|
||||
return $this->db->get($this->config->item('table_name'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user