71 lines
1.3 KiB
PHP
71 lines
1.3 KiB
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Description of Mailadresses_model
|
|
*
|
|
* @author Theo Weijmer
|
|
* @date juli 22, 2013 11:48 AM
|
|
*
|
|
*
|
|
*
|
|
*/
|
|
|
|
|
|
class Mailadresses_model extends MY_Model{
|
|
|
|
|
|
protected $tablename = 'tb_mailadresses';
|
|
|
|
|
|
function __construct(){
|
|
parent::__construct();
|
|
$models = array();
|
|
$this->load->model($models);
|
|
}
|
|
|
|
function get_details($where=FALSE){
|
|
$records = $this->get_records_where($where);
|
|
|
|
$details = $this->get_records_details($records);
|
|
|
|
return $details;
|
|
}
|
|
|
|
function get_records_details($records){
|
|
if($records){
|
|
|
|
foreach($records as $record){
|
|
$details[] = $this->get_record_details($record);
|
|
}
|
|
}
|
|
|
|
if(!isset($details)) $details = FALSE;
|
|
|
|
return $details;
|
|
}
|
|
|
|
function get_single_detail($where){
|
|
$record = $this->get_records_where($where, TRUE);
|
|
|
|
$details = $this->get_record_details($record);
|
|
|
|
return $details;
|
|
}
|
|
|
|
function get_record_details($record){
|
|
$details = new stdClass;
|
|
|
|
$details->id = $record->id;
|
|
$details->adress = $record->mailadress_adress;
|
|
|
|
return $details;
|
|
}
|
|
|
|
function table_def(){
|
|
$this->sql = "
|
|
|
|
";
|
|
|
|
}
|
|
|
|
} |