[eluser]Polarity[/eluser]
Hello,i need a tipp from the community. So heres my problem.
Say i got this User Model with a function that retrieves User Data from the Database. To print 2 Values i have to write:
Code:
$data = $this->user_model->findId(1);
print $data->username;
print $data->website;
but i want write something like this:
Code:
print $this->user_model->findId(1)->username;
print $this->user_model->findId(1)->website;
thats also no problem. but ci calls the database 2 times.
how can i prevent this without caching and without modifing the model (i got many of them already)