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 = " "; } }