Welcome Guest, Not a member yet? Register   Sign In
Parentheses in active record queries
#1

[eluser]cyberjunkie[/eluser]
Is is possible to add parentheses in queries produced by active records?

e.g.

Code:
SELECT * FROM (`posts`) WHERE `category` = 'health' AND (`tags` LIKE '%fruits%' OR 'tags' LIKE '%apples%`)

I read documentation and there's no example.

note: this is for a dynamic query. I'm adding an array in the or_like() function.


Messages In This Thread
Parentheses in active record queries - by El Forum - 07-01-2011, 01:45 PM
Parentheses in active record queries - by El Forum - 07-01-2011, 01:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB