categories + using an "or" with "where"

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 4, 2010   (RSS)

By Deborah - January 4, 2010

If this answer is in the forum, I can't find it!

I would like to display a list of records for two categories in a category list (checkboxes).

To show one category, I use the following:
list($calendarRecords2, $calendarMetaData) = getRecords(array(
'tableName' => 'calendar',
'where' => " category LIKE '%\Music - Events\t%' ",


To have two categories display, I tried the following code which does not work:
list($calendarRecords2, $calendarMetaData) = getRecords(array(
'tableName' => 'calendar',
'where' => " category LIKE '%\Music - Events\t%' or '%\Art - Events\t%' ",


Am I anywhere close on this one? I sure hope this can be done.

Thanks to anyone who can help.
Deborah

Re: [Luke] categories + using an "or" with "where"

By Deborah - January 4, 2010

Luke,

SUCCESS!!! Thanks so much. I hadn't tried that exact combination. I can use this code on several of the projects I'm working on.

[:)]
Deborah