initial commit
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* Description of niveaus_model
|
||||
*
|
||||
* @author Theo Weijmer
|
||||
* @date april 26, 2013 12:00 PM
|
||||
*
|
||||
*/
|
||||
|
||||
class Niveaus_model extends MY_Model{
|
||||
|
||||
protected $tablename = 'tbNiveaus';
|
||||
|
||||
function __construct(){
|
||||
parent::__construct();
|
||||
$models = array('');
|
||||
$this->load->model($models);
|
||||
}
|
||||
|
||||
|
||||
function get_details($where=FALSE){
|
||||
|
||||
$records = $this->get_records_where($where);
|
||||
if($records){
|
||||
foreach($records as $record){
|
||||
$details[] = $this->get_record_details($record);
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($details)) $details = FALSE;
|
||||
|
||||
return $details;
|
||||
}
|
||||
|
||||
function get_record_details($record){
|
||||
$details = new stdClass();
|
||||
|
||||
$details->id = $record->id;
|
||||
$details->nummer = $record->nummer;
|
||||
$details->omschrijving = $record->omschrijving;
|
||||
$details->tekst = $record->tekst;
|
||||
return $details;
|
||||
}
|
||||
|
||||
function get_last_niveaus ($lastVersieID){
|
||||
$this->sql= "SELECT id,nummer, omschrijving,tekst
|
||||
FROM tbNiveaus
|
||||
WHERE fw_versie = {$lastVersieID}
|
||||
AND actief = 1 ";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
function get_niveaus(){
|
||||
$this->sql= "SELECT id, omschrijving
|
||||
FROM tbNiveaus
|
||||
WHERE fw_versie = {$this->globProfielVersieID}
|
||||
ORDER BY nummer";
|
||||
return $this->get_query_result();
|
||||
}
|
||||
function get_niveau($id) {
|
||||
$this->sql = "SELECT nummer,
|
||||
omschrijving as header,
|
||||
tekst
|
||||
FROM tbNiveaus
|
||||
WHERE id= {$id}";
|
||||
return $this->get_query_row();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user