"table 1"
$this->db->select('referral1.*, client.*, employee.* ');
$this->db->from('client');
$this->db->join('referral1', 'client.referral_id = referral1.referral1_id', 'inner' );
$this->db->join('assign_psychotherapist ', 'assign_psychotherapist.a_referral_id = client.referral_id', 'inner' );
$this->db->join('employee ', 'assign_psychotherapist.a_psychotherapist_id = employee.empid', 'inner' );
$this->db->where("referral_status ='Assigned' OR referral_status ='Accepted' ");
$this->db->order_by("referral_date", "desc");
"table2"
$this->db->select('referral1.*, client.*, volunteer.* ');
$this->db->from('client');
$this->db->join('referral1', 'client.referral_id = referral1.referral1_id', 'inner' );
$this->db->join('assignvolunteer', 'assignvolunteer.Vreferralid = client.referral_id', 'inner' );
$this->db->join('volunteer', 'assignvolunteer.Vvolunteerid = volunteer.volid', 'inner' );
$this->db->where("referral_status ='Assigned' OR referral_status ='Accepted' ");
$this->db->order_by("referral_date", "desc");
How can I join the two queries together?