본문 바로가기
IT창고/PHP

CodeIgniter DB update

by 창구창고 2023. 2. 8.

📑 목차

    반응형
    // Load the database library
    $this->load->database();
    
    // Set the data to be updated
    $data = array(
      'column1' => 'value1',
      'column2' => 'value2',
      'column3' => 'value3'
    );
    
    // Set the conditions for the update
    $this->db->where('id', $id);
    
    // Perform the update
    $this->db->update('table_name', $data);
    반응형

    "이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."