Joining two seperate tables - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Joining two seperate tables (/showthread.php?tid=15265) |
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 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. |