How to join tables using ORM Datamapper CodeIgniter - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: How to join tables using ORM Datamapper CodeIgniter (/showthread.php?tid=60730) |
How to join tables using ORM Datamapper CodeIgniter - El Forum - 06-16-2014 [eluser]imohammad[/eluser] I've spent quite a few hours trying to find out a way of implementing this query: Code: SELECT * FROM To ORM Datamapper in Codeigniter. I have 3 models ( user, bookmark, snippet ). And the relationships are as follows (correct me if it's wrong): Code: user HAS MANY bookmark and snippet snippet HAS ONE user How to implement it using Datamapper in CI? Please note that bookmark is the relation between snippet and user. Bookmark table has the following attributes (ID, User_ID, Snippet_ID) |