title: Codeigniter How to Group by and having count
body: <p>Please help, I am have error with codeigniter <code>group_by</code> and <code>having</code> <code>count</code>. This is my code:</p>
  
  <pre><code>$this-&gt;db-&gt;select('*, count(*) as jumlahnya')
                  -&gt;from('tb_taruhan')
                  -&gt;where($where)
                  -&gt;group_by('tebak')
                  -&gt;having(count('tebak'))
                  -&gt;order_by('jumlahnya','DESC');
  $query = $this-&gt;db-&gt;get();
  return $query;
  </code></pre>