title: how to get the error message when query is update or not codeigniter
body: <h1>how to get the error message when query is update or not codeigniter</h1>
  
  <p>I am using codeigniter library please help<br>
  I don't care about the affect row's</p>
  
  <pre><code>$ci = &amp;get_instance();
  $ci-&gt;db-&gt;where('activity_id',$activity_id);
  $ci-&gt;db-&gt;update('activity',$activity_data);
  
  if(error){
      return false / or error message ;
  }else{
      return true;
  }
  </code></pre>