CI 묻고 답하기

제목 교차 방지...
글쓴이 이지포토 작성시각 2013/06/27 18:44:26
댓글 : 1 추천 : 0 스크랩 : 0 조회수 : 12301   RSS

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


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


 

첨부파일 1313.zip (19.2 KB)
 다음글 세션 질문입니다 ~ (2)
 이전글 파일 다운로드 질문입니다. (2)

댓글

한대승(불의회상) / 2013/06/27 21:15:25 / 추천 0
왜? 뜰까요? ^^