Welcome Guest, Not a member yet? Register   Sign In
A more and less proper method for executing subselects with Active Record.
#1

[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-...ubqueries/
#2

[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-...ubqueries/[/quote]

hmm..looks very interesting.thanks for posting.




Theme © iAndrew 2016 - Forum software by © MyBB