$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");
$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");
rjgapz 0 Newbie Poster
mangel.murti 5 Helps you in some way
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.