Welcome Guest, Not a member yet? Register   Sign In
Keep Model in memory inside a controller?
#1

[eluser]Ceros[/eluser]
hi!

I was wondering if its possible to keep in memory a model inside a controller?

Explanation:

In my controller:

In constructor:
Code:
$this->load->model('Revendeur_model', 'UnRevendeur');

From a function, I build up a model using a database:
Code:
$this->UnRevendeur->init($query->row(0)->UtilisateurID);

Then after that, with another function in my controller, i'm doing:
Code:
echo $this->UnRevendeur->getNom();

But it prints nothing.

Thanks for your help, really appreciated!
#2

[eluser]Ceros[/eluser]
Forget this.




Theme © iAndrew 2016 - Forum software by © MyBB