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

[eluser]cideveloper[/eluser]
Take out the quotes on $id in the where clause.
you have '$id' which means you are looking for '$id' in your database not the passed value

enabling profiling helps a lot when you need to debug stuff

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();
}


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