load->model($models); } function doelgroepen_per_activiteit($actID){ $this->sql="SELECT d.id, d.omschrijving FROM tbActxDoelgroep a, tbDoelgroepen d WHERE a.activiteitID = {$actID} AND d.id = a.doelgroepID"; return $this->get_query_result(); } function doelgroepen_niet_in_activiteit($actID){ $this->sql = "SELECT d.id, d.omschrijving FROM tbDoelgroepen d WHERE d.id NOT IN (SELECT doelgroepID FROM tbActxDoelgroep WHERE activiteitID = {$actID} )"; return $this->get_query_result(); } function delete_link($actID, $hulpID){ $this->sql = "DELETE FROM tbActxDoelgroep WHERE activiteitID = {$actID} AND doelgroepID = {$hulpID}"; $this->db->query($this->sql); } function get_doelgroepen_per_act ($actID){ $this->sql = "SELECT d.id, d.omschrijving, a.id as padID FROM tbActxDoelgroep a, tbDoelgroepen d WHERE a.activiteitID ={$actID} AND d.id = a.doelgroepID"; return $this->get_query_result(); } }