Welcome Guest, Not a member yet? Register   Sign In
returning multiple values from a function in a model
#1

[eluser]ag1060[/eluser]
Hello,

I have a function in a model named 'load_data($pid)' and it is suppose to get all the values from a mysql table...how can I make it so so it would return all values?


example:

function load_data($pid) {

$data['pusername'] = $this->project_model->find_user($puserid);
$data['progress'] = $this->project_model->find_progress($pid);


}

How do I return the values so I could do something like this:

function display_page($pid) {
$this->model_name->load_data($pid);
///all data from load_data should loaded and so...

$this->load->view('view',$data);

}


Is there a better approach to this or a solution?


Thanks in advance

}


Messages In This Thread
returning multiple values from a function in a model - by El Forum - 05-24-2012, 08:04 AM
returning multiple values from a function in a model - by El Forum - 05-24-2012, 11:47 AM
returning multiple values from a function in a model - by El Forum - 05-24-2012, 11:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB