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.
28 lines
942 B
PHTML
28 lines
942 B
PHTML
6 years ago
|
<?php
|
||
|
|
||
|
class Order_model extends CI_Model {
|
||
|
|
||
|
public function __construct() {
|
||
|
$this->hunter = $this->load->database('HT', TRUE);
|
||
|
}
|
||
|
|
||
|
public function get_order_by_id($order_id) {
|
||
|
$order_query = $this->hunter->query("select COLI_Name, COLI_OrderDetailText, COLI_OrderStartDate
|
||
|
from [syn123].tourmanager.dbo.ConfirmLineInfoTmp
|
||
|
where
|
||
|
COLI_ID = ?", $order_id);
|
||
|
$order_array = $order_query->row_array();
|
||
|
return $order_array;
|
||
|
}
|
||
|
|
||
|
public function get_order_by_id_in_ht($order_id) {
|
||
|
$order_query = $this->hunter->query("select COLI_Name, COLI_OrderDetailText, COLI_OrderStartDate from ConfirmLineInfo where COLI_AddCode IN
|
||
|
(select cast(coli_sn as varchar(20))
|
||
|
from ConfirmLineInfoTmp
|
||
|
where
|
||
|
COLI_ID = ?)", $order_id);
|
||
|
$order_array = $order_query->row_array();
|
||
|
return $order_array;
|
||
|
}
|
||
|
}
|