[eluser]Unknown[/eluser]
Hello,
One way you could do this is to make a MY_Controller file and in the contructor have it run the query and assign it to a variable like so:
Code:
class MY_Controller extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->model('headermodel');
$this->headerstuff = $this->headermodel->get_header_features();
}
}
You would then extend all your controllers to use My_Controller like so:
Code:
class Yourcontroller extends MY_Controller {
}
You can then access the stuff in headerstuff like so if your model sends it back as needed:
Code:
$this->headerstuff ['someheaderpart']
This is how I would approach it. They may be another way that is easier but this is how I make my configuration options available in all controllers.
I hope this helps.
Regards,
Ray