title: How to update_batch or just update all rows in my table
body: <p>my table updates all the rows, using only the last row data not the data in each rows.</p>
  
  <p>this is my model</p>
  
  <pre><code>public function update3($dtr_id)
      {   
          // $lateDdc_total_rate = $_POST['lateDdc_total_rate'];
  
          if (is_array($dtr_id)) 
          {
              $this-&gt;db-&gt;where_in('dtr_id', $dtr_id);
          }else{
              $this-&gt;db-&gt;where('dtr_id', $dtr_id);
          }
  
          $update = array(
                      'total_work_hours' =&gt; $this-&gt;input-&gt;post('total_work_hours'),
                      'time_lates' =&gt; $this-&gt;input-&gt;post('total_lates'),
                      'late_deduction' =&gt; $this-&gt;input-&gt;post('lateDdc_total'),
                      'time_under' =&gt; $this-&gt;input-&gt;post('total_under'),
                      'under_deduction' =&gt; $this-&gt;input-&gt;post('underDdc_total'),
                      'is_ACCapproved' =&gt; 1,
                      'is_computed' =&gt; 1
                      );
          $this-&gt;db-&gt;update($this-&gt;table_name, $update);
          return $update?true:false;
      }
  </code></pre>
  
  <p>this is my controller looks like</p>
  
  <pre><code>if ($this-&gt;input-&gt;post('bulk_submit3')) 
          {
              $submit = $this-&gt;input-&gt;post('checked_id');
  
              if (!empty($submit)) 
              {
                  $submit = $this-&gt;dtr_model-&gt;update3($submit);
  
                  if ($submit) 
                  {
                      $data['statusMsg'] = 'Selected DTR Reports have been successfully Submitted.';
                  }else{
                      $data['statusMsg'] = 'Some problem occurred, please Call Your IT Administrator.';
                  }
              }else{
                  $data['statusMsg'] = 'Select at least 1 record to be Submit.';
              }
          }
  
  </code></pre>
  
  <p>i've search everywhere and still no answer</p>