[eluser]Isern Palaus[/eluser]
[quote author="jedd" date="1257968847"][quote author="Isern Palaus" date="1257962802"]
... for only an array... if there is another solution faster and viable would be welcome.
[/quote]
Faster to code, or faster to execute?
If the former, in the time it's taken to discuss this, you could have written it. If the latter, the limiting factor will be the DB lookup. If you want the data available in all your controllers you'd be hard pushed to find a faster way of getting that data there.
Quote:... you can define an array on the main controller but how to make the data avaible? Doing the db query on this main controller and defining the data on the array?
I don't understand the first question. If you can define an array, you then just refer to the array, surely: $this->array_of_stuff_I_want_everywhere
Do the DB query in MY_Controller, of course, to acquire this data.[/quote]
Hello jedd,
Thank you for your reply.
At this moment, I'm trying to do my applications well-coded and doing it fast it's not a way
! I'm only looking for the best method for organization, optimization... I personally think that, after reading your replies, using a controller and extend it will be the best option.
Returning to this point, extending the main controller... It can't be directly extended, no? Because there is no CI_Controller to extend. I'll have to extend Controller and then extend my NewController. That's right?
Thanks,
Isern