Welcome Guest, Not a member yet? Register   Sign In
Confusion regarding variables in a Model
#1

[eluser]Unknown[/eluser]
Hi All,

I am a bit confused with using variables in a Model. If you see this page: http://ellislab.com/codeigniter/user-gui....html#what the function get_last_ten_entries() uses $query while other functions use $this->title, $this->content etc. I am assuming they are referenced using $this->variablename because those variables are private to this Model class and each of them will be initialized separately for separate functions.

In other words $this->title in insert_entry() will be a different variable from $this->title in update_entry(). Just wanted to confirm if I am thinking right or not.

Thanks.


Messages In This Thread
Confusion regarding variables in a Model - by El Forum - 05-09-2011, 08:53 PM
Confusion regarding variables in a Model - by El Forum - 05-09-2011, 11:47 PM
Confusion regarding variables in a Model - by El Forum - 05-10-2011, 07:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB