Hi. I am writing an advanced filter for a list that I am creating. The first part of the filter is:
(ue.`cb_providerneeds` REGEXP REPLACE('[cb_providertype]', '|*|', '|' ))AND ((ue.`cb_entcountry` REGEXP REPLACE( '[cb_countriesserviced]', '|*|', '|' ))OR (`cb_countriesserviced` LIKE '%All%'))AND (ue.`cb_invlocstate` REGEXP REPLACE( '[cb_regionserved]', '|*|', '|' ))
This works absolutely fine and returns the results that I would expect... However, when I add the following OR statement
OR (`cb_regionserved` LIKE '%All%'))
To make the entire filter:
(ue.`cb_providerneeds` REGEXP REPLACE('[cb_providertype]', '|*|', '|' ))AND ((ue.`cb_entcountry` REGEXP REPLACE( '[cb_countriesserviced]', '|*|', '|' ))OR (`cb_countriesserviced` LIKE '%All%'))AND ((ue.`cb_invlocstate` REGEXP REPLACE( '[cb_regionserved]', '|*|', '|' ))OR (`cb_regionserved` LIKE '%All%'))
...it breaks. The only part of the filter that still functions correctly is the very first condition:
(ue.`cb_providerneeds` REGEXP REPLACE('[cb_providertype]', '|*|', '|' ))
The rest of the filter breaks and all values are returned as if there is no code after that first condition. I find it odd that 1) the code does not work correctly and 2)that the addition of the OR statement breaks the filters behind it - It looks exactly the same as the OR statement before it that worked.... I'm not getting an error message and it seems like all of the code is accurate (to me anyway).
The fields cb_providerneeds, cb_entcountry and invlocstate are tied to the groups in the filter.
The fields cb_countriesserviced, cb_providertype and cb_regionserved are fields tied to the user running the query.
I'm using Joomla 1.7, and cb 1.7
If you have any suggestions, please let me know.
Many thanks.
Sorry for the long winded explanation
.