title: Codeigniter Query Builder having clause with IN statement
body: <p>I am using CodeIgniter query builder. I want to add the having clause in there.
  My code looks as follows:
  (i omitted the other parts of the query):</p>
  
  <pre><code>$this-&gt;db-&gt;having($filterarray);
  </code></pre>
  
  <p>And i build the filterarray beforehand like this:</p>
  
  <pre><code>$filterarray = array();
          if (!empty($filters['interests'])) {
              $interestids = $this-&gt;interests_model-&gt;getAllIdsByDescription($filters['interests']);
              $filterarray['interests IN'] = $interestids;
          }
  </code></pre>
  
  <p>My function getAllIdsByDescription looks like this:</p>
  
  <pre><code>function getAllIdsByDescription($names){
      $res = "(";
  
      $query = $this-&gt;db-&gt;where_in('description', $names)
          -&gt;select('interest_id')
          -&gt;get($this-&gt;tableName);
      foreach ($query-&gt;result() as $interestid) {
          $res .= $interestid-&gt;interest_id;
          $res .= ", ";
      }
      $res = substr($res, 0, -2);
      $res .= ")";
      return $res;
  }
  </code></pre>
  
  <p>It translates my query to the following, hence why I have an error:</p>
  
  <pre><code>HAVING interests IN '(7)'
  </code></pre>
  
  <p>How do i remove the quotes around the (7) ?</p>