Welcome Guest, Not a member yet? Register   Sign In
sum Multiplication quey
#2

[eluser]CroNiX[/eluser]
Try
Code:
$totals = $this->db
  ->select('SUM(qty * price) as total', FALSE) //2nd parameter FALSE tells CI to not protect the identifiers, which it has problems with more complex stuff like this
  ->get('trans_report')
  ->result_array();


Messages In This Thread
sum Multiplication quey - by El Forum - 10-04-2013, 05:14 AM
sum Multiplication quey - by El Forum - 10-04-2013, 09:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB