CodeIgniter Forums
A more and less proper method for executing subselects with Active Record. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: A more and less proper method for executing subselects with Active Record. (/thread-22872.html)



A more and less proper method for executing subselects with Active Record. - El Forum - 09-22-2009

[eluser]ShawnM[/eluser]
I'm seeing most people perform subselects by explicitly generating the SQL in a where statement (one example).

I looked into a method that enables the developer to create the subselect itself with active record and decided to use the _compile_select() method contained within the database drivers.

This has pros and cons, I go over them in this article on my site. http://shawnmccool.com/2009/09/18/using-code-igniters-active-record-class-to-create-subqueries/


A more and less proper method for executing subselects with Active Record. - El Forum - 09-22-2009

[eluser]ronnie_nsu[/eluser]
[quote author="ShawnM" date="1253673882"]I'm seeing most people perform subselects by explicitly generating the SQL in a where statement (one example).

I looked into a method that enables the developer to create the subselect itself with active record and decided to use the _compile_select() method contained within the database drivers.

This has pros and cons, I go over them in this article on my site. http://shawnmccool.com/2009/09/18/using-code-igniters-active-record-class-to-create-subqueries/[/quote]

hmm..looks very interesting.thanks for posting.