ORM datamapper - many subqueries - 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: ORM datamapper - many subqueries (/showthread.php?tid=55029) |
ORM datamapper - many subqueries - El Forum - 10-06-2012 [eluser]Tonko[/eluser] I am new in using Datamapper ORM for Codeigniter, so I need some help. I am trying to do my own blog in CI with ORM. I have it written in classic CI Active record class, and there is a problem to write some queries in ORM syntax (or I do not know it and I need help). I have the blog, where are articles and they have comments. User can also vote the post. In classic CI AR I have this query: Code: $query = $this->db->select(" This give me array with all informations I need. I only pass this array to view and show it. This query returns me author full name (from table profiles, not user - I use TankAuth), and it gives me counted comments, it also gives me average mark of voting. Is possible to make this in ORM? I need your help, please! |