Checking multiple fields for displaying lists.

8 posts by 2 authors in: Forums > CMS Builder
Last Post: November 24, 2008   (RSS)

Re: [tsuluwerks] Checking multiple fields for displaying lists.

By Dave - November 19, 2008

Hi T,

Looks like you're using an older version of CMS Builder. We've updated the generated code a bit. That's bit though it's similar and will still work.

Try this:

$options['where'] = ' ( offering_type_1 LIKE "%Generations%" OR fieldname2 LIKE "%Generations%" OR fieldname3 LIKE "%Generations%" ) ';

LIKE lets you use wildcards such as % which mean (any number of characters).

This can also be put in the url like this:

yourViewer.php?offering_type_1,fieldname2,fieldname3_keyword=Generations

You can read more about the build in url searching features here:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html

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

Re: [Dave] Checking multiple fields for displaying lists.

By tsuluwerks - November 19, 2008

Thanks Dave. I'll give it a try. I have another client using a newer version, and it's much easier. What can we do to get the latest version for all of our clients?

T

Re: [tsuluwerks] Checking multiple fields for displaying lists.

By Dave - November 19, 2008

Upgrades are by donation and you can download the latest zip here: http://www.interactivetools.com/upgrade/

I'd upgrade your clients one at a time just to make sure everything goes smoothly. But we've made the upgrade process simpler so now you can just upload all the folders instead of worrying about which ones should and shouldn't be uploaded.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Checking multiple fields for displaying lists.

By tsuluwerks - November 21, 2008

the LIKE statement isn't working either. We're having a similar issue on another page. I hope to figure this out or find an alternative solution.

Re: [tsuluwerks] Checking multiple fields for displaying lists.

By Dave - November 21, 2008

I'm pretty sure that code is valid. What is it doing? Just not returning any results? Can you attach the viewer file to this post so we can see the code?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Checking multiple fields for displaying lists.

By tsuluwerks - November 24, 2008

Hi, Dave, we found that the viewer works if we replace LIKE with OR. Thanks for your help!
T

Re: [tsuluwerks] Checking multiple fields for displaying lists.

By Dave - November 24, 2008

Great, glad it's working! :)
Dave Edis - Senior Developer
interactivetools.com