Database-based configuration library/model? |
[eluser]tolyx[/eluser]
Hi - Does anyone know about or has developed a db-based configuration library or model? I'd love to be able to a) Return config values from a database table of one row, whose field names are of all different types so that I can return: $this->db_config->email_address; b) Save new config values easily: $this->db_config->save('email_address'=>'[email protected]'); c) Automatically generate form elements depending on the db field types - e.g. a text field for VARCHAR and textarea for TEXT Any ideas before I attempt to do it myself? Dan.
[eluser]TheFuzzy0ne[/eluser]
I haven't seen such a library. It sounds like what you need is very specific, so you'd probably be better off writing your own library. Be careful, though, as a lot of CodeIgniter's configuration data needs to be made available before the database is loaded.
[eluser]Daniel H[/eluser]
Sorry I should be clear that this is for non-core CI config items, such as email addresses etc. that will need to be updated by a user.
[eluser]Mushex Antaranian[/eluser]
I'm using model for it, like OpenBlog.. hope it will help you Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); If any questions, feel free to email me jesirobendebua@gmail ) |
Welcome Guest, Not a member yet? Register Sign In |