HT = $this->load->database('HT', TRUE); $this->INFO = $this->load->database('INFO', TRUE); } public function updateOrderInfo($table,$id,$key,$value){ if($table == 'trainsystem'){ $idKey = 'ts_id'; }elseif($table == 'trainsystem_tickets'){ $idKey = 'tst_id'; }else{ exit(); } $sql = " update {$table} set {$key} = '{$value}' where {$idKey} = {$id} "; $this->INFO->query($sql); } }