This topic is locked
[SOLVED]

 all conditions over same field (Search question)

2/11/2019 6:35:56 PM
PHPRunner General questions
M
MikeT author

You can add the same search field >1 time in the search panel.
Question: is it possible to use this to do a search "contains TermA AND contains TermB" ?

In my tests it always does an any (OR) search in this scenario, independently on the selection in the dropdown (any condition / all conditions).
In other words: a query of the form (pseudo-SQL): SELECT....WHERE searchField like "%foo%" AND searchField like "%bar%"

admin 2/13/2019

This can be done, with the help of Search API. You can use setSearchSQL function from Search API for this purpose:

https://xlinesoft.com/phprunner/docs/searchapi_set_search_sql.htm

M
MikeT author 2/15/2019

Thanks, I'll have a look at it.