Welcome Guest, Not a member yet? Register   Sign In
Missing column data in join clause
#1

[eluser]nofearinc[/eluser]
I have a select clause with 2 join statements which looks like this:

Code:
$this->CI->db->where('username', $user);
        $this->CI->db->join('user_groups', 'users.user_id = user_groups.user_id', 'left');
        $this->CI->db->join('groups', 'groups.group_id = user_groups.group_id', 'left');
        
        $query = $this->CI->db->get('users');

I am able to extract most of the columns from the result set, but I get empty value for the user_id column. I suspect that the problem could be in ambiguous column names during join. Tried to set aliases to joined columns, but no success. Also compiled the SQL code and ran into the database, it gets all the data.


Messages In This Thread
Missing column data in join clause - by El Forum - 12-14-2009, 07:17 PM
Missing column data in join clause - by El Forum - 12-14-2009, 07:36 PM
Missing column data in join clause - by El Forum - 12-15-2009, 02:56 AM
Missing column data in join clause - by El Forum - 12-15-2009, 03:50 AM
Missing column data in join clause - by El Forum - 12-15-2009, 04:05 AM
Missing column data in join clause - by El Forum - 12-15-2009, 04:10 AM
Missing column data in join clause - by El Forum - 12-15-2009, 10:40 AM
Missing column data in join clause - by El Forum - 12-15-2009, 11:09 AM



Theme © iAndrew 2016 - Forum software by © MyBB