Welcome Guest, Not a member yet? Register   Sign In
SQL optimization via Active Record
#2

[eluser]Derek Allard[/eluser]
There is a where_in() function in AR yes, but this particular query looks very (very) complex, and I think you're probably better off with just a
Code:
$this->db->query("select USER_NAME, FIRST_NAME, LAST_NAME, PICTURE from USERS where USERS.id IN ((select ID from senders) UNION (SELECT ID from recipients))");


Messages In This Thread
SQL optimization via Active Record - by El Forum - 02-02-2008, 02:19 PM
SQL optimization via Active Record - by El Forum - 02-02-2008, 02:34 PM
SQL optimization via Active Record - by El Forum - 02-02-2008, 04:15 PM
SQL optimization via Active Record - by El Forum - 02-03-2008, 03:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB