33 lines
717 B
PHP
33 lines
717 B
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Description of Orgusers_model
|
|
*
|
|
* @author LS
|
|
* @date april 26, 2013 12:00 PM
|
|
*
|
|
*/
|
|
|
|
class Versies_model extends MY_Model{
|
|
|
|
protected $tablename = 'tbVersies';
|
|
|
|
function __construct(){
|
|
parent::__construct();
|
|
$models = array('');
|
|
$this->load->model($models);
|
|
}
|
|
function get_versies(){
|
|
$this->sql="SELECT id, omschrijving, datum,vastgelegd
|
|
FROM tbVersies
|
|
ORDER BY id desc";
|
|
return $this->get_query_result();
|
|
}
|
|
function get_laatste_record(){
|
|
$this->sql="SELECT max(ID) as maxID
|
|
FROM tbVersies
|
|
WHERE vastgelegd = 1";
|
|
$rij = $this->db->query($this->sql);
|
|
return $rij->row('maxID');
|
|
}
|
|
} |