Search Operator %like%

wildmanmatt

New member
Hi,

I am trying to implement a search within a dadabik database of a notes field. The "contains" operator seems to be mysql "like" which doesn't bring back enough search results within a text area.

Is there an option for a %like% search? Or is there a way that I can bring one in?

Thanks,

Matt
 

eugenio

Administrator
Staff member
Hello,
contains TEST works exactly as LIKE '%TEST%'; you can verify it by setting $display_sql = 1, DaDaBIK will show on the screen the query executed.

Best,
 

wildmanmatt

New member
Thanks for that - the problem was I had a select multiple in the same search which was bringing through its search as an is_null the display_sql really helped
 

eugenio

Administrator
Staff member
Ok, you are welcome.

Check also the inline help in the form configurator about the search operator because different field types support different search operators, for example, about select_multiple*:

select_multiple_menu and select_multiple_checkbox are compatible just with is_null, is_equal and is_different; please note that when you search a value in a select_multiple_* field using is_equal, you will find records having the selected value for the field (which means only that value or that value AND also other ones if you selected several values).

Best,
 
Top