Welcome Guest, Not a member yet? Register   Sign In
Outputting Select Sum
#5

[eluser]tecrik[/eluser]
No kidding, I am having a blast Wink Thanks so much for the help here, though!

So I ran into a different problem with this part:

Code:
function order_value_average ()
{
  $this->db->select_avg('summe');
  $query = $this->db->get('orders');

  return $query->summe;
            
}

According to the user guide, this part

Code:
$this->db->select_avg('summe');
$query = $this->db->get('orders');

should produce something like "SELECT AVG(summe) as summe FROM members" which makes the entire snippit very similar to the one in my inital post. Still, I get the following error message "Undefined property: CI_DB_mysql_result::$summe" in my view.

In general, I am confused about the "return" part, meaning how to return data and in which way. Is there some kind of documentation for that?


Messages In This Thread
Outputting Select Sum - by El Forum - 08-25-2009, 09:17 AM
Outputting Select Sum - by El Forum - 08-25-2009, 09:24 AM
Outputting Select Sum - by El Forum - 08-25-2009, 09:38 AM
Outputting Select Sum - by El Forum - 08-25-2009, 10:16 AM
Outputting Select Sum - by El Forum - 08-25-2009, 11:14 AM
Outputting Select Sum - by El Forum - 08-25-2009, 11:19 AM
Outputting Select Sum - by El Forum - 08-26-2009, 02:32 AM
Outputting Select Sum - by El Forum - 08-26-2009, 02:47 AM
Outputting Select Sum - by El Forum - 08-26-2009, 09:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB