filtering listings

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

Re: [jtedescojam] filtering listings

By Chris - August 30, 2009

Hi jtedescojam,

<= means less-than-or-equal-to, which usually doesn't make sense unless you're talking about numbers. You probably want a straight equality test:

'where' => "color = 'blue' AND size = 'large' ",

Hope this helps! Please let us know if you have any more questions or comments.
All the best,
Chris

Re: [chris] filtering listings

By jtedescojam - August 30, 2009

yeah that'll do it... thanks! (and yes, it was a duped request, I didn't think the first one went through)
John Tedesco

Creative Director



JAM Graphics

Re: [jtedescojam] filtering listings

By jtedescojam - October 13, 2009

This works perfectly for everything... except for some reason it doesn't work when it's set for multiple checkboxes??? Any ideas... the following code works fine when it's set for 'pull down'

'allowSearch' => '0',
'where' => "event_type = 'Corporate Events'",

does not work when it's set for checkboxes.
John Tedesco

Creative Director



JAM Graphics

Re: [jtedescojam] filtering listings

By Chris - October 14, 2009

Multi-value list fields are stored a little differently. They're stored as a list of tab-separated values, so you need to use LIKE:

'allowSearch' => '0',
'where' => "event_type LIKE '%\tCorporate Events\t%'",


I hope this helps. Please let me know if you have any questions.
All the best,
Chris

Re: [chris] filtering listings

By jtedescojam - October 14, 2009

You guys are awesome... I hope you never get too big that your response time and personal assistance lags.
John Tedesco

Creative Director



JAM Graphics