initial commit
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Description of model
|
||||
*
|
||||
* @author Liesbeth
|
||||
* @date april 25 2013
|
||||
*/
|
||||
|
||||
class ModPartActxDoelgroep extends MY_Model{
|
||||
|
||||
protected $tablename = 'tbPartActxDoelgroep';
|
||||
|
||||
|
||||
function __construct(){
|
||||
// parent::__construct();
|
||||
//$models = array();
|
||||
//$this->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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user