Welcome Guest, Not a member yet? Register   Sign In
Select Sum and Undefined Property Issue
#6

[eluser]Doosje[/eluser]
I'm watching now better and see that you are missing ->result();
So
Code:
$this->db->select_sum('movies.price','total_price');
$this->db->where('year(movies.date_added)',$_POST['year']);
$query = $this->db->get('movies');
THEN
Code:
$data['query_total'] = $query->result();
OR
Code:
$data['query_total'] = $query->row();

If you only care about one result then do the row thing .. and
Code:
$query_total->total_price;

else .. loop thru the array
or use
Code:
$query_total[0]->total_price;


Messages In This Thread
Select Sum and Undefined Property Issue - by El Forum - 03-02-2008, 08:53 AM
Select Sum and Undefined Property Issue - by El Forum - 03-02-2008, 08:58 AM
Select Sum and Undefined Property Issue - by El Forum - 03-02-2008, 09:06 AM
Select Sum and Undefined Property Issue - by El Forum - 03-02-2008, 09:08 AM
Select Sum and Undefined Property Issue - by El Forum - 03-02-2008, 09:21 AM
Select Sum and Undefined Property Issue - by El Forum - 03-02-2008, 09:26 AM
Select Sum and Undefined Property Issue - by El Forum - 03-02-2008, 09:53 AM
Select Sum and Undefined Property Issue - by El Forum - 05-08-2012, 04:04 AM
Select Sum and Undefined Property Issue - by El Forum - 05-08-2012, 05:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB