title: Codeigniter $this->db->select() not work with Round(Max()) or FORMAT(MAX())
body: <p>I  write following code</p>
  
  <pre><code>$this-&gt;db-&gt;select('SUM(qty) as total_qty,(FORMAT(SUM(amount),2)) as total_amount');
  $this-&gt;db-&gt;where('Invoice_Rec_No',$Invoice_Rec_No);
  $result=$this-&gt;db-&gt;get($this-&gt;invoice_products_tbl);
  $total_data=$result-&gt;row(); 
  </code></pre>
  
  <p>but getting error </p>
  
  <pre><code>Error Number: 1064
  
  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (tbl_invoice_products) WHERE Invoice_Rec_No = 7' at line 2
  
  SELECT SUM(qty) as total_qty, (FORMAT(SUM(amount), 2)) as total_amount FROM (tbl_invoice_products) WHERE Invoice_Rec_No = 7
  
  Filename: C:\wamp\www\admin_followme247_master\system\database\DB_driver.php
  </code></pre>
  
  <p>I want to execute this query with codeigniter ActiveRecord.</p>