Welcome Guest, Not a member yet? Register   Sign In
Alias, how?
#1

[eluser]Asinox[/eluser]
Hi, im trying to make a JOIN but i hav a field with the same name in both tables, how i ll make a ALIAS for 1 field?
Code:
function listar_subcategorias(){
        $this->db->select('*');
        $this->db->from('subcategories');
        $this->db->join('categories','categories_id=subcategories.category_id');
        $query = $this->db->get();
        return $query->row_result();
}

Thanks


Messages In This Thread
Alias, how? - by El Forum - 07-16-2008, 07:53 AM
Alias, how? - by El Forum - 07-16-2008, 08:09 AM
Alias, how? - by El Forum - 07-16-2008, 08:11 AM
Alias, how? - by El Forum - 07-16-2008, 10:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB