Welcome Guest, Not a member yet? Register   Sign In
how to do multiple selects and arithmetic using Active Record
#4

[eluser]m4rw3r[/eluser]
If you want to circumvent the escaping that the where() method does and assign the value directly:
Code:
$this->db->ar_from[] = "(SELECT id FROM products ... ) as prod";
Then you can make subselects and similar operations.
I don't know if it is recommended to do like this, but I think it improves performance of the query (otherwise you have to do some of the work in PHP).


Messages In This Thread
how to do multiple selects and arithmetic using Active Record - by El Forum - 02-21-2008, 04:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB