我可以使用多個數據庫 主要連接的連接是從database.php中多個數據庫連接
但所述另一個在從模型 ,我想
這樣
它之間切換 $config['remote']['hostname'] = 'localhost';
$config['remote']['username'] = 'root';
$config['remote']['password'] = '';
$config['remote']['database'] = 'countries';
$config['remote']['dbdriver'] = 'mysql';
$config['remote']['dbprefix'] = '';
$config['remote']['pconnect'] = TRUE;
$config['remote']['db_debug'] = TRUE;
$config['remote']['cache_on'] = FALSE;
$config['remote']['cachedir'] = '';
$config['remote']['char_set'] = 'utf8';
$config['remote']['dbcollat'] = 'utf8_general_ci';
$config['remote']['swap_pre'] = '';
$config['remote']['autoinit'] = TRUE;
$config['remote']['stricton'] = FALSE;
$this->load->database($config);
$this->load->database('remote', TRUE);
此代碼必須在模型 – 2012-04-15 06:03:12