Codeigniter confusing with $this->db queries
<p>I'm trying to access data by using another model's method in my model but it gives me error because it confuses by previous $this->db parameters:</p>

<pre><code>        $this-&gt;db-&gt;select('*');

        $this-&gt;db-&gt;group_start();
        $this-&gt;db-&gt;like('title',$keyword);
        $this-&gt;db-&gt;or_like('keyword',$keyword);
        $this-&gt;db-&gt;group_end();

        $locations = $this-&gt;place_model-&gt;search_ids_by_name($location);
</code></pre>

<p>and the search_ids_by_name() of Place_model is like this:</p>

<pre><code>  public function search_ids_by_name($q) {
          $this-&gt;db-&gt;select('id');
          $this-&gt;db-&gt;like('name',$q);
          $qry = $this-&gt;db-&gt;get('places');
          $results =  $qry-&gt;result_array();
          $place_ids = array();
          foreach ($results as $result) {
            array_push($place_ids, $result['id']);
          }
          return $place_ids;
  }
</code></pre>

<p>But it gives me below error</p>

<blockquote>
  <p>Error Number: 1054, Unknown column 'category' in 'where clause' 
  Filename: models/Place_model.php</p>
</blockquote>

<p>It seems in my place_model function also using like and or_like methods. How can I seperate them.</p>