Welcome Guest, Not a member yet? Register   Sign In
Storing data in controller

I need some help with a simple solution regarding getting data from a model and storing individual data in variables within the controller, here is my code.. not sure if im on the right track:


function getdata {


$request_data = $this->m_model->get_data()

$d1 = $request_data->id;

$d2 = $request_data->first_name;

$d3 = $request_data->last_name;



function get_data() {
    $this->db->select('id, first_name,last_name, email, credits, job_title,department');
    $result = $this->db->get('employees');
    return $result->result();

Messages In This Thread
Storing data in controller - by El Forum - 11-14-2011, 09:01 PM

Theme © iAndrew 2016 - Forum software by © MyBB