我可以使用多个数据库 主要连接的连接是从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