Welcome Guest, Not a member yet? Register   Sign In
Active Record - where_in AND or_like
#2

[eluser]WanWizard[/eluser]
To alter the selection order of the where clause you need to use brackets:
Code:
SELECT * FROM (`items`) WHERE `category_id` IN ('7', '43') AND (`id` LIKE '%TK%' OR `item_code` LIKE '%TK%')

Search the forum, I posted an DB_active_rec.php extension that introduced a method to add brackets to an active record query...


Messages In This Thread
Active Record - where_in AND or_like - by El Forum - 06-20-2010, 12:15 AM
Active Record - where_in AND or_like - by El Forum - 06-20-2010, 03:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB