title: Codeigniter : $this->db->_error_message() message returns NULL
body: <p>I have a query which gives me perfect results. But I need to send the mysql errors (if any) to UI. So I deliberately change column name to <code>blah_text</code>.</p>
  
  <pre><code>$qID = 13
  $this-&gt;db-&gt;select('id AS optionID, blah_text AS option, is_correct AS isCorrect');
  $oQuery = $this-&gt;db-&gt;get_where('xq_options', array('question_id' =&gt; $qID));
  if($oQuery){
      $qnaArray['options'] = $oQuery-&gt;result_array();
  }
  else{
      //$qnaArray['error'] = $this-&gt;db-&gt;_error_message();
      echo "Error: " .  $this-&gt;db-&gt;_error_message();
  }
  </code></pre>
  
  <p>All the get is <code>Error:</code></p>
  
  <p>I tried using native mysqli function <code>mysqli_error($oQuery);</code> but same O/P</p>
  
  <p>Note: I have set <code>'db_debug' =&gt; FALSE</code> in database config files. If I set it to TRUE, i do get the CI error message </p>
  
  <p><code>Error Number: 1054 Unknown column 'blah_text' in 'field list' SELECT id AS optionID, blah_text AS option, is_correct AS isCorrect</code></p>
  
  <p>How do I capture sql errors in a variable and send it to UI like <code>$qnaArray['error']</code></p>
  
  <p>EDIT: <code>'db_debug'</code> is currently set to FALSE. I want the error message to be set in a variable. Not echoed on the screen.</p>