title: CodeIgniter: Call to a member function row() on bool
body: <p>Since I have upgraded from CodeIgniter 2.2.6 to 3.xx I have a issue I can't resolve.</p>
  
  <h2>The model</h2>
  
  <pre><code>function get_the_continue_id_pregunta_from_level($level_type, $level)
  {
      $this-&gt;db-&gt;select();
      $this-&gt;db-&gt;from('preguntas');
      $this-&gt;db-&gt;where($level_type, $level);
      $this-&gt;db-&gt;where('language', 2);
      $this-&gt;db-&gt;where("`id` NOT IN (SELECT `id_pregunta` FROM `user_as_preguntas` WHERE user_id =" . $this-&gt;session-&gt;userdata('id') .  "  )", NULL, FALSE);
      $this-&gt;db-&gt;order_by("id", "ASC"); 
      $this-&gt;db-&gt;limit(1);
      $q = $this-&gt;db-&gt;get();
      if(!$q-&gt;num_rows &gt; 0) {
          $q = FALSE;
      }
  
      return $q;  
  }
  </code></pre>
  
  <h2>The controller</h2>
  
  <pre><code>$g2 = $this-&gt;Qcm-&gt;get_the_continue_id_pregunta_from_level('level_1',$row-&gt;level_1);
  $g2 = $g2-&gt;row()-&gt;id;
  </code></pre>
  
  <h2>Error</h2>
  
  <blockquote>
    <p>Call to a member function row() on bool</p>
  </blockquote>