WHERE Command Usage?

5 posts by 2 authors in: Forums > CMS Builder
Last Post: February 6, 2009   (RSS)

Re: [movierelics] WHERE Command Usage?

Also, when I use,

'where' => 'department = "Alley"' AND 'department = "Global"',

It displays articles tagged with other departments and not just the ones tagged "Alley" and "Global".

Re: [movierelics] WHERE Command Usage?

By Dave - February 5, 2009

Hi movierelics,

Is it a single value field or a multi value field? (eg: Is it a list field that lets you select multiple values at the same time?)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] WHERE Command Usage?

Its the php sql code at the top of the page to get a news list to fill. Multiple stories from a single table.

Re: [movierelics] WHERE Command Usage?

By Dave - February 6, 2009

Try this:

'where' => " department = 'Alley' OR department = 'Global' ",

And if you're using a multi value list field and the above doesn't work try this:

'where' => " department LIKE '%Alley%' OR department LIKE '%Global%' ",

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com