Welcome Guest, Not a member yet? Register   Sign In
Solved : Newbie question - Working with models
#4

[eluser]xwero[/eluser]
Your code looks a bit odd because it looks like you are doing two sql statements but the AR library cleans it up for you. But you better write it like this
Code:
$this->db->select('pSku, pName, pCost, pPrice, pSkulist,sum(pPrice) as BaseBundlePrice');    //     grab products with skulists
        $this->db->where("pSkulist <> ''");
        $this->db->from('products');

        $this->db->group_by('pSku,pSku'); //group the items, using same reference for both
$querybundle = $this->db->get();
        return $querybundle->result();


Messages In This Thread
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 12:26 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 12:45 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 01:00 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 01:12 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 01:20 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 01:33 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 01:43 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 02:08 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 02:15 AM
Solved : Newbie question - Working with models - by El Forum - 08-11-2008, 03:39 AM
Solved : Newbie question - Working with models - by El Forum - 08-12-2008, 12:15 AM
Solved : Newbie question - Working with models - by El Forum - 08-12-2008, 01:45 AM
Solved : Newbie question - Working with models - by El Forum - 08-12-2008, 11:44 PM
Solved : Newbie question - Working with models - by El Forum - 08-13-2008, 07:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB