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/pay/models/Group_model.php

37 lines
1.2 KiB
PHP

<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Group_model extends CI_Model {
private $HT;
function __construct() {
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
}
public function update_ck_group_info($COLI_SN)
{
$group_sn_query =
"select COLI_GRI_SN from ConfirmLineInfo where COLI_SN=?
union
select COLI_GRI_SN from BIZ_ConfirmLineInfo where COLI_SN=?";
$group_sn_row = $this->HT->query($group_sn_query, array($COLI_SN, $COLI_SN))->row();
var_dump($group_sn_row);
if (!empty($group_sn_row) && $group_sn_row->COLI_GRI_SN > 0) {
$group_sn = $group_sn_row->COLI_GRI_SN;
$check_group_query = "select CGI_SN from CK_GroupInfo where CGI_GRI_SN=?";
$check_group_row = $this->HT->query($check_group_query, array($group_sn))->row();
var_dump($check_group_row);
if (empty($check_group_row)) {
$update_group_query = "exec SP_CheckGroup_UpdateCKGroupInfo(?, 29)";
$update_group_row = $this->HT->query($update_group_query, array($group_sn));
}
}
}
}