Welcome Guest, Not a member yet? Register   Sign In
Sub Queries or better way to do this?
#1

I need to take this query:


PHP Code:
    public function get_active_pools() {
        $this->db->where('active''1');
        $query $this->db->get('pools');
        return $query->result();
    


and join it to a second table that is related by an id and then count how many times the id of the first table is listed in the second table. What is my best method of doing this with Query Builder?
Reply


Messages In This Thread
Sub Queries or better way to do this? - by BamaStangGuy - 05-18-2016, 04:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB