title: Convert this sql code to codeigniter?
body: <p>How do i convert this sql code to CodeIgniter?</p>
  
  <pre><code>    SELECT *,sum(sales_total) as daily_report FROM `tbl_sales`,(select 
      sum(sales_total) as month from tbl_sales where date_format(sales_date,'%m') = '01') as totals where sales_date = '2018-01-18'
  </code></pre>