Welcome Guest, Not a member yet? Register   Sign In
Confusion calling model functions
#2

[eluser]Dam1an[/eluser]
Firstly, you can't have a controller and a model both called Posts, that should have thrown an error
Secondly, when doing
Code:
$this->Post->getAll();
The p in Posts should be lower case, so
Code:
$this->post->getAll();

The reason the second example you show works is cause it's a static funtion, so you use the capitalized name of the class (although it should be Posts, not Post :-S)


Messages In This Thread
Confusion calling model functions - by El Forum - 06-27-2009, 02:13 AM
Confusion calling model functions - by El Forum - 06-27-2009, 02:29 AM
Confusion calling model functions - by El Forum - 06-27-2009, 03:23 AM
Confusion calling model functions - by El Forum - 06-27-2009, 05:12 AM
Confusion calling model functions - by El Forum - 06-27-2009, 01:09 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:15 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:40 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:48 PM
Confusion calling model functions - by El Forum - 06-27-2009, 02:52 PM
Confusion calling model functions - by El Forum - 06-27-2009, 03:06 PM
Confusion calling model functions - by El Forum - 06-27-2009, 03:41 PM
Confusion calling model functions - by El Forum - 06-27-2009, 04:07 PM
Confusion calling model functions - by El Forum - 06-27-2009, 04:58 PM
Confusion calling model functions - by El Forum - 06-27-2009, 05:23 PM
Confusion calling model functions - by El Forum - 06-27-2009, 05:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB