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/webht/third_party/messagecenter/models/messagecenter_model.php

33 lines
1.3 KiB
PHP

<?php
class messagecenter_model extends CI_Model {
function __construct() {
parent::__construct();
$this->INFO = $this->load->database('INFO', TRUE);
$this->HT = $this->load->database('HT', TRUE);
}
public function get_tp_list($from_time,$to_time){
$sql = 'select * from trippest_sms_log where TPSL_callbackTime > ? and TPSL_callbackTime < ? and TPSL_sendState = 1';
$query = $this->INFO->query($sql,array($from_time,$to_time));
return $query->result();
}
public function get_cht_list($from_time,$to_time){
$sql = 'select * from [syn123].InfoManager.dbo.train_sms_verification where created_on > ? and created_on < ?';
$query = $this->INFO->query($sql,array($from_time,$to_time));
return $query->result();
}
public function getOrderInfo($order){
$sql = "select GUT_FirstName,GUT_LastName,COLD_StartDate from BIZ_ConfirmLineInfo INNER JOIN BIZ_ConfirmLineDetail on coli_sn = COLD_COLI_SN INNER JOIN BIZ_GUEST on COLI_GUT_SN = GUT_SN where COLI_ID = ?";
$query = $this->HT->query($sql,array($order));
return $query->row();
}
public function updateColiMemo($order,$message){
$sql = 'update BIZ_ConfirmLineInfo set COLI_Memo = ? where coli_id = ?';
$query = $this->HT->query($sql,array($message,$order));
return $query->row();
}
}