CodeIgniter Forums
Joining two seperate tables - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Joining two seperate tables (/thread-15265.html)



Joining two seperate tables - El Forum - 01-30-2009

[eluser]JayArias[/eluser]
fixed.


Joining two seperate tables - El Forum - 02-03-2009

[eluser]obiron2[/eluser]
No worries, Glad to be of help


Obiron


Joining two seperate tables - El Forum - 02-03-2009

[eluser]mk3[/eluser]
Nice post... can u share your expierence ?


Joining two seperate tables - El Forum - 02-03-2009

[eluser]JayArias[/eluser]
sure,
Code:
$this->db->join('members', 'member_profile.user_id = usr.id');

will basically join "members" with "member_profile" where `id` = `$id` which will pull information on that member from the user tables and the profile tables corresponding to that member's id.


Joining two seperate tables - El Forum - 02-03-2009

[eluser]mk3[/eluser]
active record class Smile more info here Active record in user manual.


Joining two seperate tables - El Forum - 02-03-2009

[eluser]JayArias[/eluser]
Hope this helps other users.