You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
information-system/application/third_party/trainsystem/models/train_tools_model.php

26 lines
574 B
PHP

<?php
class train_tools_model extends CI_Model {
private $order="";//订单号
function __construct() {
parent::__construct();
$this->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);
}
}