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.
#2

[eluser]WanWizard[/eluser]
No, this is not supported by default, but I recall someone mention a solution when it was discussed before.

Use the search to see if you can find it...




Theme © iAndrew 2016 - Forum software by © MyBB