Welcome Guest, Not a member yet? Register   Sign In
Retrieving users profile and displaying it.
#1

[eluser]puffnstuff[/eluser]
Just started with Codeigniter and I am using Ion Auth for members administration.

I have a table called "users" with a field of "id" and another "profile" with a field called "id".

When the user is logged in I would like to display the users profile with the equivalent id.

I think I am close to figuring this out. This is what I have in my users model...

Code:
function user_profile() {

  $this->db->select('*');
        $this->db->from('users');
        $this->db->join('profile', 'users.id = profile.id','left');
        $query = $this->db->get();
        
         return $query->result();
        
        

  
  
  }

I am not sure if I am way off base and if I am close I am not sure how to go from here to echo out the profile.


Messages In This Thread
Retrieving users profile and displaying it. - by El Forum - 08-12-2012, 02:19 AM
Retrieving users profile and displaying it. - by El Forum - 08-12-2012, 07:48 AM
Retrieving users profile and displaying it. - by El Forum - 08-12-2012, 09:29 AM
Retrieving users profile and displaying it. - by El Forum - 08-12-2012, 09:49 AM
Retrieving users profile and displaying it. - by El Forum - 08-12-2012, 10:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB