Welcome Guest, Not a member yet? Register   Sign In
Configure database config from function
#5

You can pass array of patamteres to database loader like this:

PHP Code:
$config['hostname'] = 'localhost';
$config['username'] = 'myusername';
$config['password'] = 'mypassword';
$config['database'] = 'mydatabase';
$config['dbdriver'] = 'mysqli';
$config['dbprefix'] = '';
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['cache_on'] = FALSE;
$config['cachedir'] = '';
$config['char_set'] = 'utf8';
$config['dbcollat'] = 'utf8_general_ci';

$this->load->database($config); 
Reply


Messages In This Thread
RE: Configure database config from function - by siburny - 02-29-2016, 07:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB