initial commit
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Description of model
|
||||
*
|
||||
* @author Liesbeth
|
||||
* @date april 25 2013
|
||||
*/
|
||||
|
||||
class Modpartactxorgusers extends MY_Model{
|
||||
|
||||
protected $tablename = 'tbPartActxOrgusers';
|
||||
|
||||
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
$models = array();
|
||||
$this->load->model($models);
|
||||
}
|
||||
function get_uitvoerenden ($actID){
|
||||
$this->sql = " SELECT CONCAT_WS(' ' , voornaam,tussenvoegsel,achternaam) as naam
|
||||
FROM tbPartActxOrgusers p
|
||||
LEFT JOIN tb_orgusers o
|
||||
on o.id = p.orguserID
|
||||
LEFT JOIN tb_users u
|
||||
ON u.id = o.user_id
|
||||
WHERE p.activiteitID = {$actID}";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
function get_activiteiten_per_user($orguserid, $partID=FALSE){
|
||||
$this->sql = "SELECT pa.id, pa.naam, pa.start,pa.eind, pa.duur,pa.gereed,
|
||||
f.naam as fase,
|
||||
p.naam as pijler,
|
||||
pa.pijlerid
|
||||
FROM tbPartActxOrgusers po, tbPartActiviteiten pa
|
||||
LEFT JOIN tbFases f
|
||||
ON f.id = pa.fase
|
||||
LEFT JOIN tbPartPijlers pp
|
||||
ON pp.id = pa.pijlerid
|
||||
LEFT JOIN tbPijlers p
|
||||
ON p.id = pp.pijlerID
|
||||
WHERE po.orguserID = $orguserid
|
||||
AND pa.id = po.activiteitID ";
|
||||
if ($partID) { $this->sql .= " AND pa.partituurID = {$partID}" ;}
|
||||
else { $this->sql .=" AND pa.partituurID = {$this->partituurid}"; };
|
||||
return $this->get_query_result();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user