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.
26 lines
574 B
PHTML
26 lines
574 B
PHTML
6 years ago
|
<?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);
|
||
|
}
|
||
|
|
||
|
}
|