Getting an invalid model function error when the function is declared. |
[eluser]doors[/eluser]
I have a crud model for my menu system. When I load the model and try to execute three particular functions that are declared in the model I get php error stating that the model function is not declared. The error is as follows: Fatal error: Call to undefined method Main_model::edit_menu() ... Can anyone tell me what is going on?
[eluser]bradym[/eluser]
You probably want to use Code: $this->edit_menu(); instead of Code: Main_model::edit_menu(); Take a look at http://www.php.net/manual/en/keyword.paa...otayim.php (PHP 4) or http://www.php.net/manual/en/language.oo...otayim.php (PHP 5).
[eluser]doors[/eluser]
[quote author="bradym" date="1211768153"]You probably want to use Code: $this->edit_menu(); instead of Code: Main_model::edit_menu(); I am actually using $this->main_model->edit_menu() to access the edit_menu() function within the Main_model class model.
[eluser]bradym[/eluser]
Then, as Michael said, we'll need to see some code to help you. |
Welcome Guest, Not a member yet? Register Sign In |