load->model($models); } function getAll(){ $this->sql = "SELECT id, omschrijving FROM tbDoelgroepen"; return $this->get_query_result(); } function findNoUse($doelgroepID){ $this->sql = "SELECT count(*) as aantal FROM tbActxDoelgroep a, tbPartActxDoelgroep p WHERE a.doelgroepID = {$doelgroepID} OR p.doelgroepID = {$doelgroepID}"; $count = $this->db->query($this->sql)->row()->aantal; if ($count > 0) {return false;} else {return true;}; } }