0

Hi all this is my first question, and it might be that Im currently over confusing matters.... I have got a database config file which specifies the SQL database that is used. What I want to do is make it so that the database name is the same as the subdomain. Thus meaning that the same php can be used to access different databases. If you get me. Any help greatly appreciated.

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'databaseserver',
    'username' => 'admin',
    'password' => 'password',
    'database' => 'subdomain',
    '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
);
Your Common Sense
  • 156,878
  • 40
  • 214
  • 345
Scizzla
  • 1
  • 1

0 Answers0