function kcGetData_max_m_phy_no()
{
$this->db->select('max(m_phy_no) as max_no');
$query = $this->db->get($this->table_name);
return $query->row()->max_no;
}
function kcInsert()
{
$row = $this->kcGetData_m_phy_no($this->input->post('m_phy_no'));
if ($row) {
//Alert('이미 등록되어 있는 번호 입니다. 다른 번호 로 입력하여 보시기 바랍니다.');
$next_m_phy_no = (int)($this->kcGetData_max_m_phy_no()) + 1 ; echo $next_m_phy_no; exit;
$this->db->set('m_phy_no', "$next_m_phy_no");
}else{
$this->db->set('m_phy_no', $this->input->post('m_phy_no'));
}
$VAL = $_POST;
$this->kcSetField($VAL);
$this->db->set('regdate', date('Y-m-d H:i:s'));
$this->db->insert($this->table_name);
}
왜 첨부한 메세지가 뜨는거죠?