title: updating a field status in DB table using Codeigniter
body: <p>I want to update the 'not yet' status to 'already'</p>
  
  <p><strong>Have error</strong></p>
  
  <pre><code>A Database Error Occurred
  Error Number: 1054
  Unknown column 'sudah' in 'field list'
  UPDATE `tb_peserta` SET `sudah` = '' WHERE `no_pendaftaran` = '13'
  Filename: C:/xampp/htdocs/codeigniter/system/database/DB_driver.php
  Line Number: 691
  </code></pre>
  
  <p><strong>My Controller</strong></p>
  
  <pre><code>function status_verifikasi($no_pendaftaran){
      $where = array('no_pendaftaran' =&gt; $no_pendaftaran);
      $this-&gt;M_pendaftar-&gt;status_verifikasi($where,'tb_peserta');
      redirect('admin/Ca_pendaftar');}
  </code></pre>
  
  <p><strong>My Model</strong></p>
  
  <pre><code>function status_verifikasi($where,$tb_peserta){
      if ($status_verifikasi ='belum') {
         $this-&gt;db-&gt;set('sudah');
     } else{
         $this-&gt;db-&gt;set('belum');
     }
     $this-&gt;db-&gt;where($where);
     $this-&gt;db-&gt;update($tb_peserta);}
  </code></pre>
  
  <p><strong>My View</strong></p>
  
  <pre><code>&lt;?=anchor('admin/Ca_pendaftar/status_verifikasi/'.$tb_peserta-&gt;no_pendaftaran,
                'Konfirmasi', ['class'=&gt;'btn btn-success btn-sm' , 'onclick'=&gt;"return confirm('Ubah status pendaftar ?');"])?&gt;
  </code></pre>