Welcome Guest, Not a member yet? Register   Sign In
using values from config in the db config file

I'm trying to centralize the change in configuration information into one file.

I want to set the db configuration along this lines

$db['default']['database'] = $this->config->item("db_name");

When I tried this it tells me that "this" is not available in this context.

Any thoughts on how to do this?

It seems a bit weird to import config settings in a config file. This also means there can only be one database group.

But a way to do it is just to include the one file, get the settings you need and destroy the rest
$db = $config['db'];

Thanks that suits my purpose just fine.

Theme © iAndrew 2016 - Forum software by © MyBB