질문 Q #10622
교차 방지...
이지포토 2013-06-27 18:44:26

 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);
 }


왜 첨부한 메세지가 뜨는거죠?


 

답변 1
#1 한대승(불의회상) 2013-06-27 21:15:25
왜? 뜰까요? ^^