How to use OR or LIKE clause
2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 20, 2015 (RSS)
By degreesnorth - May 19, 2015
Hi
Sorry for the dumb question, but how do you properly use the OR or LIKE clause?
For example, 'where' => ' suburb="Lidcombe" OR "Auburn" , (that doesn't work)
I'm a bit confused with this.
Thanks
By Dave - May 20, 2015
Hi degreesnorth,
Like this:
'where' => ' suburb="Lidcombe" OR suburb="Auburn" ',
You just need to watch the quotes inside the statement are different from the quotes outside the statement, eg ' "like this" '. And then just write individual conditions/tests and OR them together.
And if you want to get fancy another way to do it is like this:
'where' => ' suburb IN ("Lidcombe", "Auburn") ',
Hope that helps!
interactivetools.com