Welcome Guest, Not a member yet? Register   Sign In
Fatal error: Call to undefined method
#1

[eluser]Perkin5[/eluser]
I'm getting this response after calling a very simple method from the controller like this:

Code:
function fetchcode(){
$code = $this->Admin_model->get_code();
return $code;
}

The model method is:

Code:
function get_code(){
print_r('got this far');die();
$results = $this->db->get('price_cat');
$code = $results->result();
return $code;
}

I've got the model method primed to 'print_r die' when it is called but codeigniter tells me it's undefined. I know the Model is loaded as I'm successfully calling a number of other methods from the same model.

Any idea what's wrong?


Messages In This Thread
Fatal error: Call to undefined method - by El Forum - 03-20-2012, 06:19 AM
Fatal error: Call to undefined method - by El Forum - 03-20-2012, 06:25 AM
Fatal error: Call to undefined method - by El Forum - 03-20-2012, 07:34 AM
Fatal error: Call to undefined method - by El Forum - 03-21-2012, 06:05 AM
Fatal error: Call to undefined method - by El Forum - 03-21-2012, 06:24 AM
Fatal error: Call to undefined method - by El Forum - 03-21-2012, 06:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB