42 lines
1.1 KiB
PHP
42 lines
1.1 KiB
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Description of partituur activiteiten x hulpmiddelen model
|
|
*
|
|
* @author Liesbeth
|
|
* @date april 25 2013
|
|
*/
|
|
|
|
class ModPartActxHulpmiddel extends MY_Model{
|
|
|
|
protected $tablename = 'tbPartActxHulpmiddel';
|
|
|
|
|
|
function __construct(){
|
|
// parent::__construct();
|
|
//$models = array();
|
|
//$this->load->model($models);
|
|
}
|
|
function get_hulpmiddelenlijst_per_activiteit($actID, $hulpID = false){
|
|
$this->sql="SELECT a.id as hID, h.omschrijving , h.id as hulpID
|
|
FROM tbPartActxHulpmiddel a, tbHulpmiddelen h
|
|
WHERE a.actID = {$actID}";
|
|
if ($hulpID) {$this->sql .= " AND a.hulpID = {$hulpID}";} ;
|
|
$this->sql .= " AND h.id = a.hulpID";
|
|
return $this->get_query_result();
|
|
}
|
|
function get_id_string($partactid){
|
|
$this->sql = "SELECT hulpID
|
|
FROM tbPartActxHulpmiddel
|
|
WHERE actID = {$partactid}";
|
|
$results = $this->get_query_result();
|
|
$strResult='';
|
|
if ($results){
|
|
foreach ($results as $result){
|
|
if (strlen($strResult) > 0) {$strResult .=',' ;};
|
|
$strResult .=$result->hulpID;
|
|
};
|
|
};
|
|
return $strResult;
|
|
}
|
|
} |