diff --git a/application/models/Oqrs_model.php b/application/models/Oqrs_model.php index 0cc87564..c6631bab 100644 --- a/application/models/Oqrs_model.php +++ b/application/models/Oqrs_model.php @@ -304,4 +304,16 @@ class Oqrs_model extends CI_Model { return 0; } } + + function getOqrsStationsFromSlug($logbook_id) { + $sql = 'SELECT station_callsign FROM `station_logbooks_relationship` JOIN `station_profile` ON station_logbooks_relationship.station_location_id = station_profile.station_id WHERE station_profile.oqrs = 1 AND station_logbook_id = '.$logbook_id.';'; + + $query = $this->db->query($sql); + + if ($query->num_rows() > 0) { + return true; + } else { + return false; + } + } }