CodeIgniter Forums

Full Version: Loading config from database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]codeninja[/eluser]
I am looking for a good solution to load and save config from database. Ideally what I have right now is a hack to extend CI_Config and then just try to load the config from database.. ie. if you do $this->load->config("hello") it will look for config_hello table and try to load the key->value pair from the database..

I am not too happy with that solution.. i also want the ability to edit the changes to any of these configs quickly and easily via html views.

any thoughts?

El Forum

[eluser]Vheissu[/eluser]
I've written something myself, but it doesn't load the changes into the config file permanently. I more-so just overwrite the values for a particular session. I would like to set the values via the database but am concerned the just how much extra strain (performance wise) it would put on my site and database hitting the database all of the time.

Would love to hear others thoughts on this question too.

El Forum

[eluser]codeninja[/eluser]
Maybe saving should be user specific settings.