Using WHERE clause with Search

5 posts by 3 authors in: Forums > CMS Builder
Last Post: March 9, 2009   (RSS)

By pothompson - March 8, 2009

Can anybody tell me if it's possible to specify an additional WHERE clause in the view code if the code is being used to display search results?

Currently, I can get the search working, but as soon as I add a WHERE clause, that's the only thing that seems to be used when displaying the results.

Thanks - Paul.

Re: [pothompson] Using WHERE clause with Search

By gkornbluth - March 9, 2009

Hi Paul,

The where clause can limit the results of a search in many ways, like limiting the search results to only those records where a particular field starts with, or contains particular values. Say, when you'd only want to search within a particular category of items.

You might find the explanations on this and other topics in my CMSB Cookbook helpful.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [pothompson] Using WHERE clause with Search

By Dave - March 9, 2009

Hi Paul,

Both the where and the search code should both apply. Which version of CMSB are you using?
Dave Edis - Senior Developer
interactivetools.com

Re: [pothompson] Using WHERE clause with Search

By Dave - March 9, 2009

Sure, if you continue running into problems feel free to email me the search link and CMS and FTP login details to dave@interactivetools.com and I can take a look at your code (email, don't post login details to the forum).

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