Searching > Advanced Seach "Like" issue

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

Hey

Table "quote_request" has a field "quote_sent_to" which is a list/array, such as "1, 3, 6" (related to another table "installers" by 'num').

I have set up an advanced seach filter on "quote_request" so I can filter it by company:

sent|quote_sent_to

This offers a nice dropdown where I can select the installer.

However this actually produces:

[code]

FROM `cms_quote_requests` as `quote_requests`
WHERE ((true) AND (((`quote_sent_to` LIKE '%5%')

[/code]

Which causes problems because it returns where quote_sent_to = 15, 51, 52 etc, not just '5'.

Previously when ive come across this problem, I've had to use in_array - is there anything inbuilt in CMSB I can change my advanced search filter to so it'll work?

Cheers

Rob

easy peasy thanks