Hi,
I created a search field and in the Read Data function I mentioned two 'Searchable fields':
Model.a
Model.b
Currently the system executes the WHERE clause as: WHERE 'Model'.'a' LIKE '%search text%' AND 'Model'.'b' LIKE '%search text%'
While I would expect an OR instead of AND: WHERE ('Model'.'a' LIKE '%search text%' OR 'Model'.'b' LIKE '%search text%')
Please also note the round brackets around the search conditions, so: WHERE category='123' AND (a LIKE '%s%' OR b LIKE '%s%') in case another condition is part of the original Read Data function.
This would make more sense in my opinion as a search algorithm.
Is this subject for improvement, or do I miss something here?
Kind regards,
Nico
I created a search field and in the Read Data function I mentioned two 'Searchable fields':
Model.a
Model.b
Currently the system executes the WHERE clause as: WHERE 'Model'.'a' LIKE '%search text%' AND 'Model'.'b' LIKE '%search text%'
While I would expect an OR instead of AND: WHERE ('Model'.'a' LIKE '%search text%' OR 'Model'.'b' LIKE '%search text%')
Please also note the round brackets around the search conditions, so: WHERE category='123' AND (a LIKE '%s%' OR b LIKE '%s%') in case another condition is part of the original Read Data function.
This would make more sense in my opinion as a search algorithm.
Is this subject for improvement, or do I miss something here?
Kind regards,
Nico