Welcome Guest, Not a member yet? Register   Sign In
Problem with join
#1

[eluser]Sein Kraft[/eluser]
This my code but it down't work properly because the user.id should be 24 and is returning the rank.id as user.id.

Code:
$query_users = $this->db
                            ->from('users')
                            ->join('roles', 'roles.id = users.role')
                            ->join('ranks', 'ranks.id = users.rank')
                            ->limit($limit, $offset)
                            //->order_by('u_date', 'desc')
                            ->get();
Quote:Array
(
[0] => Array
(
[id] => 1
[user] => seinkraft
[pass] => 55487196c2206c9345816936490688514f448edf
[email] => [email protected]
[activation_key] =>
[recovery_key] =>
[role] => Administrator
[rank] => Rank 1
[ip] => 127.0.0.1
[registered] => 1259933944
[last_visit] => 1259934493
[avatar] =>
[gender] => 0
[birthdate] => 0000-00-00
[location] =>
[signature] =>
[url] =>
[icq] =>
[aim] =>
[yim] =>
[msn] =>
)

)

Help please!


Messages In This Thread
Problem with join - by El Forum - 12-04-2009, 06:01 PM
Problem with join - by El Forum - 12-04-2009, 10:41 PM
Problem with join - by El Forum - 12-05-2009, 01:08 AM
Problem with join - by El Forum - 12-05-2009, 06:04 AM
Problem with join - by El Forum - 12-05-2009, 07:42 AM
Problem with join - by El Forum - 12-05-2009, 08:35 AM
Problem with join - by El Forum - 12-05-2009, 09:46 AM
Problem with join - by El Forum - 12-05-2009, 10:03 AM
Problem with join - by El Forum - 12-05-2009, 10:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB