[eluser]maddtechwf[/eluser]
I have a model setup that pulls the data that I want. I then want to take that data and display it on a table on a view.
Can anyone help me with this?
Model
Code:
public function get_company_info($company_id)
{
$q_company = $this
->db
->where('id', $company_id)
->get('company');
if ( $q_company->num_rows > 0) {
return $q_company->row();
}
return false;
}
Controller
Code:
public function company_info()
{
$data['admin_content'] = "company_info";
$this->load->model('admin_model');
$company = $this
->admin_model
->get_company_info(
$this->session->userdata('company_id')
);
$this->load->view('includes/template_admin', $data);
if ( $company !== false) {
return $company;
}
}
l would appreciate any help.