load->model($models); } function get_doelgroepen_per_act ($actID){ $this->sql = "SELECT d.id, d.omschrijving, a.id as padID FROM tbPartActxDoelgroep a, tbDoelgroepen d WHERE a.activiteitID ={$actID} AND d.id = a.doelgroepID"; return $this->get_query_result(); } function get_doelgroep($newID){ $this->sql = "SELECT d.id, d.omschrijving, a.id as padID FROM tbPartActxDoelgroep a, tbDoelgroepen d WHERE a.id ={$newID} AND d.id = a.doelgroepID"; return $this->get_query_row(); } function get_other_doelgroepen($actID){ $this->sql = "SELECT d.id, omschrijving FROM tbDoelgroepen d WHERE d.id not in (SELECT doelgroepID FROM tbPartActxDoelgroep a WHERE a.activiteitID = {$actID})"; return $this->get_query_result(); } }