Welcome Guest, Not a member yet? Register   Sign In
Active records question, join and two id's how to get each id??
#1

[eluser]123wesweat[/eluser]
Code:
$this->db->from('tableA');
                $this->db->join('tableA', 'tableA.id = tableB.nameID');
                $this->db->where('user_id', $user_id);
                return $this->db->get();

But i have an field name id in both tables, how do i get both of this id's??

At the moment i have
Code:
$res = $this->db_model->get_profile($user_id)->result

$res->id just gives the id of tableA.

How do i get tableB.id???


Messages In This Thread
Active records question, join and two id's how to get each id?? - by El Forum - 02-16-2010, 08:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB