students.permanent_address,IFNULL(students.category_id, 0) as
                `category_id`,IFNULL(categories.category, "") as `category`
                ,students.adhar_no,students.samagra_id,students.bank_account_no
                ,students.bank_name, students.ifsc_code , students.guardian_name
                , students.father_pic ,students.height ,students.weight,students
                .measurement_date, students.mother_pic , students.guardian_pic ,
                students.guardian_relation,students.guardian_phone,students
                .guardian_address,students.is_active ,students.created_at
                ,students.updated_at,students.father_name,students.father_phone
                ,students.blood_group,students.school_house_id,students
                .father_occupation,students.mother_name,students.mother_phone
                ,students.mother_occupation,students.guardian_occupation
                ,students.gender,students.guardian_is,students.rte,students
                .guardian_email')->from('students');
$this->db->join('student_session', 'student_session.student_id =
            students.id');
$this->db->join('classes', 'student_session.class_id = classes.id');
$this->db->join('sections', 'sections.id = student_session.section_id');
$this->db->join('hostel_rooms', 'hostel_rooms.id = students
            .hostel_room_id', 'left');
$this->db->join('hostel', 'hostel.id = hostel_rooms.hostel_id', 'left');
$this->db->join('categories', 'students.category_id = categories
                 .id', 'left');
$this->db->join('room_types', 'room_types.id = hostel_rooms
            .room_type_id', 'left');
$this->db->join('vehicle_routes', 'vehicle_routes.id = students
            .vehroute_id', 'left');
$this->db->join('transport_route', 'vehicle_routes.route_id =
            transport_route.id', 'left');
$this->db->join('vehicles', 'vehicles.id = vehicle_routes.vehicle_id',
            'left');
$this->db->join('school_houses', 'school_houses.id = students
            .school_house_id', 'left');
$this->db->where('student_session.session_id', 14);
$this->db->where('students.id', 2);
$q = $this->db->get();
$arr=$q->result();
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX