title: Fatal error: Call to a member function num_rows() on boolean in Code igniter
body: <p>I have face this Fatal error:  problem in local.</p>
  
  <pre><code>$rr = $this-&gt;CI-&gt;db-&gt;query("select * from $table $condition ");
  
  $mm = $rr-&gt;num_rows();
  
  if ($mm&gt;0) {
  
      return 1;
  
  } else {
  
      return 0;
  
  }
  </code></pre>