title: CodeIgniter: return FALSE if Active Record can't find any data
body: <p>Using CodeIgniter, I find the following code in all the models that gathers data from a database:</p>
  
  <pre><code>// .. taken from function get_user_data($user_id)
  // Select data
  $user_data = $this-&gt;db-&gt;from('users')-&gt;where('id', $user_id)-&gt;get()-&gt;row();
  
  // Check if we got any matches
  if(isset($user_data-&gt;id)) {
  
    // Indeed we did, return the data found
    return $user_data
  
  } else {
  
     // Nope, no data found
     return FALSE;
  
  }
  </code></pre>
  
  <p>The interesting part is where I check if the query actually returned any data. I'm doing that for EVERY query, which adds up to quite a bit <strong>repetitive code</strong>. </p>
  
  <p>Is there any way to, perhaps override the CodeIgniter functions, making them <strong>return <code>FALSE</code> if no data was found</strong>? 
  I'm probably missing something, as I can't see why CodeIgniter isn't handling this already.</p>