I've a got a error says Not unique table/alias: 'pcdom_missionaries'
here's my sample code in model
public function samplemethodname()
{
$this->db->select('companionship_id, missionary_one_id, missionary_two_id, missionary_three_id, pcdom_companionship.zone_id AS pczone_id, pcdom_companionship.district_id AS pcdistrict_id,
pcdom_companionship.area_id AS pcarea_id, assignment, zone_name, pcdom_zone.zone_id AS pz_zone_id, district_name, pcdom_district.district_id AS pd_district_id, area_name, pcdom_area.area_id AS pa_area_id, missionary_id, missionaries_name')
->from('pcdom_companionship')
->join('pcdom_missionaries','pcdom_missionaries.missionary_id = pcdom_companionship.missionary_one_id','left')
->join('pcdom_missionaries','pcdom_missionaries.missionary_id = pcdom_companionship.missionary_two_id','left')
->join('pcdom_missionaries','pcdom_missionaries.missionary_id = pcdom_companionship.missionary_three_id','left')
->join('pcdom_zone','pcdom_zone.zone_id = pcdom_companionship.zone_id','left')
->join('pcdom_district','pcdom_district.district_id = pcdom_companionship.district_id','left')
->join('pcdom_area','pcdom_area.area_id = pcdom_companionship.area_id','left');
$sql = $this->db->get();
if($sql && $sql->num_rows() > 0 )
return $sql->result();
else
return;
}
An error appears in the image
Can Anyone had the ideas? thanks in advance