Welcome Guest, Not a member yet? Register   Sign In
Outputting data problem
#2

[eluser]mi6crazyheart[/eluser]
Change u'r model to this...
Code:
function get_person_contact($id){
        $this->db->select('ct.type, pc.details');
        $this->db->from('person_contact pc');
        $this->db->where('pc.person_id', '$id');
        $this->db->join('contact_type ct', 'pc.contact_id = ct.id');
        $query = $this->db->get();
        return $query->result();
}

VIEW should be
Code:
foreach($contact as $item):
echo $item->ct.type ;
echo $item->pc.details;
endforeach;


Messages In This Thread
Outputting data problem - by El Forum - 12-27-2010, 12:24 AM
Outputting data problem - by El Forum - 12-27-2010, 03:19 AM
Outputting data problem - by El Forum - 12-27-2010, 07:52 PM
Outputting data problem - by El Forum - 12-27-2010, 09:32 PM
Outputting data problem - by El Forum - 12-27-2010, 10:03 PM
Outputting data problem - by El Forum - 12-27-2010, 10:58 PM
Outputting data problem - by El Forum - 12-27-2010, 11:32 PM
Outputting data problem - by El Forum - 12-27-2010, 11:53 PM
Outputting data problem - by El Forum - 12-28-2010, 12:02 AM
Outputting data problem - by El Forum - 12-28-2010, 09:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB