32 lines
953 B
PHP
32 lines
953 B
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/** Sorteringen_model februari 2018 */
|
|
|
|
class Sorteringen_model extends MY_Model{
|
|
|
|
protected $tablename = 'tb_sorteringen';
|
|
|
|
function __construct(){
|
|
parent::__construct();
|
|
$models = array('');
|
|
$this->load->model($models);
|
|
}
|
|
function get_criteriabijSWV($swvID){
|
|
$this->sql =" SELECT id, swv_id, naam
|
|
FROM tb_sorteringen
|
|
WHERE swv_id= {$swvID}
|
|
ORDER BY naam ";
|
|
return $this->get_query_result();
|
|
}
|
|
|
|
function getSchoolIndeling($schoolid, $sorteerid){
|
|
$this->sql =" SELECT SL.id as waardeid, SL.naam AS waarde
|
|
FROM tb_sorteringen S
|
|
JOIN tb_sorteerlabels SL ON S.id = SL.sortering_id
|
|
JOIN tb_sorteerlabels_org LO ON LO.label_id = SL.id
|
|
WHERE LO.organisatie_id = {$schoolid}
|
|
AND S.id = {$sorteerid} ";
|
|
return $this->get_query_row();
|
|
}
|
|
|
|
} |