$config['hostname'] = $server_ip;
$config['username'] = $sql_account;
$config['password'] = $sql_pwd;
$config['database'] = $sql_dbname;
$config['dbdriver'] = "mysql";
$config['dbprefix'] = "";
$config['pconnect'] = FALSE;
$config['db_debug'] = TRUE;
$config['cache_on'] = FALSE;
$config['cachedir'] = "";
$config['char_set'] = "utf8";
$config['dbcollat'] = "utf8_general_ci";
$DB1 = $this->load->database($config, TRUE);
$sql = "SHOW TABLES WHERE Tables_in_{$sql_dbname} = 'zen_configuration';";
$res_r = $DB1->query($sql);
if($res_r -> num_rows()>0){
//更新相应数据库信息
}
//更新主数据库信息
$this->load->database('default', TRUE);
$sql_my = "INSERT INTO syn_siteid_log(website_id,old_site_id,new_site_id,d_datetime)VALUES('{$website_id}','{$old_site_id}','$site_id',NOW());";
$this->db->query($sql_my);