Welcome Guest, Not a member yet? Register   Sign In
Cannot Pass More than two variable to view
#8

(04-22-2018, 10:08 AM)Wouter60 Wrote: Check your model, and change the function employee_spends() :

PHP Code:
function employee_spends($id)
{
    
$query $this->db->query("SELECT SUM(price) as total FROM inventory WHERE employee_id=" $id);
    if (
$query->num_rows() == 0) {
        return 
0;
    }
    else {
        return 
$query->row()->total;
    }
}

Hey Wouter60

Its workThank your support.. 
Reply


Messages In This Thread
RE: Cannot Pass More than two variable to view - by sanjaya - 04-22-2018, 09:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB