title: how to sum of column in codeigniter database class?
body: <p>I want to sum a column data if date is in between some predefined date.</p>
  
  <p>i am doing this with core php is like</p>
  
  <pre><code>SUM(IF(`trl`.`entrydate` between '2015-01-01' and '2015-01-31', `trl`.`itemvalue`, 0))
  </code></pre>
  
  <p>So how can i do it with codeigniter</p>