db->last_query() and profiling of DB queries. | When you run a query, with this setting set to TRUE (default), | CodeIgniter will store the SQL statement for debugging purposes. | However, this may cause high memory usage, especially if you run | a lot of SQL queries ... disable this to avoid that problem. | | The $active_group variable lets you choose which connection group to | make active. By default there is only one group (the 'default' group). | | The $query_builder variables lets you determine whether or not to load | the query builder class. */ if(ENVIRONMENT == 'development') { $active_group = 'dev'; } else if(ENVIRONMENT == 'testing') { $active_group = 'test'; } else if(ENVIRONMENT == 'production') { $active_group = 'prod'; } $query_builder = TRUE; $db['dev'] = array( 'dsn' => '', 'hostname' => getenv('DEV.HOSTNAME'), //'hostname' => 'localhost', 'username' => getenv('DEV.USERNAME'), //'username' => 'root', 'password' => getenv('DEV.PASSWORD'), // 'password' => '', 'database' => getenv('DEV.DATABASE'), 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE, 'port' => getenv('DEV.PORT') ); $db['test'] = array( 'dsn' => '', 'hostname' => getenv('TEST.HOSTNAME'), //'hostname' => 'localhost', 'username' => getenv('TEST.USERNAME'), //'username' => 'root', 'password' => getenv('TEST.PASSWORD'), // 'password' => '', 'database' => getenv('TEST.DATABASE'), 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE, 'port' => getenv('TEST.PORT') ); $db['prod'] = array( 'dsn' => '', 'hostname' => getenv('PROD.HOSTNAME'), //'hostname' => 'localhost', 'username' => getenv('PROD.USERNAME'), //'username' => 'root', 'password' => getenv('PROD.PASSWORD'), // 'password' => '', 'database' => getenv('PROD.DATABASE'), 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE, 'port' => getenv('PROD.PORT') );