CodeIgniter Forums
Loading config from database - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Loading config from database (/thread-36412.html)

Loading config from database - El Forum - 11-30-2010

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?

Loading config from database - El Forum - 11-30-2010

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.

Loading config from database - El Forum - 11-30-2010

Maybe saving should be user specific settings.