Welcome Guest, Not a member yet? Register   Sign In
working with two tables under one function
#5

thanks for the response have got rud of my first error when data is null but now my issue in controller how to retrieve the returned values to work with them
mycode:


        function index()
    {        
        
        $details = $this->user_model->get_user_by_id($this->session->userdata('uid'));    
        
        //kama row haina kitu kufanyike nini?------some code
        if ($details ){
            
        
        //Hii code inaload row moja yenye session iko active  in both tables ie facility na users
        
        $data['uname'] = $details[0]->name;
        $data['uemail'] = $details[0]->email;
        $data['ucat'] = $details[0]->category;
        $data['fmail'] = $details[0]->emaile;
        $data['age'] = $details[0]->age;
            
            $this->load->view('profile_view', $data);
            
            
        }
        else if ($data['ucat'] =='service' && $data['fmail']!=$data['uemail'] )
        {
            
            
            $this->load->view('facility_view', $data);
            
            
        }
        
        else
        {
            $this->load->view('welcome_message.php');
        }
        }

thanks
Sense & Simplicity
Reply


Messages In This Thread
RE: working with two tables under one function - by frankdmin - 03-28-2017, 04:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB