title: How to use batch update/insert sql using codeigniter?
body: <p>in this example.. how can i simplified and fasten up the update and insert of data in the database?</p>
  
  <pre><code>//if count($arr_list['sample_element1'] is 500+++ or more records
  
  $i =0;
  while ($i &lt; count($arr_list['sample_element1'])) {
  
  $update_db= array('column1' =&gt; $arr_list['sample_element1'][$i],'column2' =&gt; $arr_list['sample_element2'][$i]);
  
  $this-&gt;db-&gt;update('sample_table',$update_db);
  
  $i++;
  }
  </code></pre>
  
  <p>if the record to be save is over 1000 data...it will take about sometime to finish the process.. thank in advance.. =)</p>