Where statement - List checkboxes (multi value)

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 9, 2012   (RSS)

By crazyfish - October 9, 2012 - edited: October 9, 2012

Ok, my brain can't wrap around this problem this morning.
Artist portfolio page results in list form

Field name 'available' in section 'portfolio'

List options available, sold, student, print ( some single checks some multi )
as a checkboxes ( multi value)

I have 3 pages for lists available, sold and prints

I can't seem to get the Where statement correct. IF any record is "available" ( or sold or prints ) show it

list($portfolioRecords, $portfolioMetaData) = getRecords(array(
'tableName' => 'portfolio',
'perPage' => '21',
'where' => "available LIKE '%\tavailable\t%'",
));

Now that only shows "available" where ONLY "available" is checked, but it two fields are checked ie available + print it drags up a different list.

I know this isn't completely clear but hopefully you understand what I need.

What is the Where statement for a list type if any of the multi values match?

Re: [greg] Where statement - List checkboxes (multi value)

By crazyfish - October 9, 2012

ha, simple problem solved.

Its NOT '%\tavailable\t%'",
but %available%

Thanks for your ideas, you guys rock.

PS yes I know I was vague as hell :)