Hi,
cc6 build search with AND when several fields are indicate in "Searchable fields". In this case nothing appears in result,
Is it possible to build the query with OR ?
Thanks
cc6 build search with AND when several fields are indicate in "Searchable fields". In this case nothing appears in result,
Is it possible to build the query with OR ?
Thanks
Hi Chris,
Yes, but you will need to add the fields in the "where conditions" instead and remove them from the "searchable fields".
Best regards,
Max
Yes, but you will need to add the fields in the "where conditions" instead and remove them from the "searchable fields".
Model.field1/LIKE:%{data:keywords}%
OR
Model.field2/LIKE:%{data:keywords}%
OR
Model.field3/LIKE:%{data:keywords}%
Best regards,
Max
HI
Further to this - how can I modify the query so:
[pre](
Model.firstname/LIKE:%{data:firstname}%[br]AND[br]Model.lastname/LIKE:%{data:lastname}%[br])[br]OR[br]Model.address/LIKE:%{data:address}%[/pre]
[br]
I can't seem to force those enclosing (). I have tried 'escaping' them /( and /) with no success. Do I need to resort to PHP?????
Regards
Nick
Further to this - how can I modify the query so:
[pre](
Model.firstname/LIKE:%{data:firstname}%[br]AND[br]Model.lastname/LIKE:%{data:lastname}%[br])[br]OR[br]Model.address/LIKE:%{data:address}%[/pre]
[br]
I can't seem to force those enclosing (). I have tried 'escaping' them /( and /) with no success. Do I need to resort to PHP?????
Regards
Nick
Hi,
do you try this ?
do you try this ?
(
Model.firstname/LIKE:%{data:firstname}%
Model.lastname/LIKE:%{data:lastname}%
)
OR
Model.address/LIKE:%{data:address}%
(
Model.firstname/LIKE:%{data:firstname}%
AND
Model.lastname/LIKE:%{data:lastname}%
)/-
OR
Model.address/LIKE:%{data:address}%/-
Thanks Gents. I can get Christophe's solution to work just fine but not that from HealyHatman.
Pretty sure that I have the syntax copied correctly:-
Regards
Nick
Pretty sure that I have the syntax copied correctly:-
(I am just checking that some more.
mdlCheckName.lastname/LIKE:{data:lastname}%
AND
mdlCheckName.firstname/LIKE:{data:firstname}%
)/-
OR
mdlCheckName.street/LIKE:{data:address}%/-
Regards
Nick
This topic is locked and no more replies can be posted.