other db connected
$otherdb = $this->load->database('otherdb', TRUE);
$id = 4;
if ($customeThemeSlug) {
$save['customeTheme'] = $customeThemeSlug;
$this->db->where('id', $id);
$this->db->update('company_info', $save);
}
// $query = $otherdb->select('*')->get('company_info');
$otherdb->where('id', $id);
$otherdb->update('company_info', $save);
// $query = $otherdb->select('*')->get('company_info');
$otherdb->where('id', $id);
$otherdb->update('company_info', $save);
$db['otherdb'] = array(
'dsn' => '',
'hostname' => 'localhost',
'username' => 'root',
'password' => '',
'database' => 'allthemes',
'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
);
Comments
Post a Comment