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

[eluser]tecrik[/eluser]
Thanks, that worked! Knowing about "AS" would have helped a lot ;-) I find myself having to learn PHP and CI at the same time on a project that's just a bit to extensive for that purpose ;-)

I now know wrote the function like this:

Code:
function revenue ()
{
$query = $this->db->select('SUM(summe) AS `total`', FALSE)
    ->from('orders')
    ->where('hidden', 0)
    ->get()
    ->row();
                                            
    return $query->total;
            
        }


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