How I make a list that only shows record that I have a contain value for a certain field?

5 posts by 3 authors in: Forums > CMS Builder
Last Post: October 28, 2008   (RSS)

By zrmiles - October 27, 2008

I have a list of records that I need filter so it only shows the records that have contain a certain value in a certain field. Is this possible using your CMS?

also, the record might have multiple values in that field, such as "community, utility". How do I make sure it shows up both in the list that contains only those with "community" and the one that contains only those with "utility"?

Thanks

Re: [rjbathgate] How I make a list that only shows record that I have a contain value for a certain field?

By zrmiles - October 28, 2008

Yes, Thank you.

Is there any way to make it so it just has to contain the word, so even if it was "community, utility" in the field, it would still show up when I included the where statement for "community"

Re: [zrmiles] How I make a list that only shows record that I have a contain value for a certain field?

There'll probably be a way of simply sticking in wildcards around the keyword community, maybe

%community%
or
*community*

I'm not sure what would work thou, so maybe Donna or Dave can come to the rescue?!

Re: [zrmiles] How I make a list that only shows record that I have a contain value for a certain field?

By Dave - October 28, 2008

In a where statement it would be:
'where' => " myfield LIKE '%community%' ",

or in the url:
yourViewer.php?myfield_keyword=community

There's more on CMS Builders built in search engine functions here: http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com