[SOLVED] filter to exclude selected email addresses

13 years 3 months ago - 13 years 2 months ago #152275 by zilty4
I am requiring users (or administrators) to enter an email address for every record (person).

When they don't supply an email I am prepending their user name to "@foo.foo" in order to create an email that CB accepts as valid but which will not be delivered anywhere.

Now I want to filter my "Valid Email" list to exclude all the foos, by creating a filter that says: email != %@foo.foo.

But this does not work and my email list is still all the records. I have tried to follow the CB_1.2.2_stable_manual.pdf around pp 132. But I have it wrong.

And when I view the list from the front end of the site, I cannot see the actual email that is associated with a user, only the words Email and Sendmail.

Thank you for any help.

Please Log in to join the conversation.

13 years 3 months ago #152377 by krileon

When they don't supply an email I am prepending their user name to "@foo.foo" in order to create an email that CB accepts as valid but which will not be delivered anywhere.

Please ensure your filter is as follows.

FIELD LIKE %@foo.foo

If you use Equal To it will not match. You may always want to try the below.

FIELD LIKE %foo%

And when I view the list from the front end of the site, I cannot see the actual email that is associated with a user, only the words Email and Sendmail.

This needs to be changed within CB configuration on the general tab to display emails differently (raw instead of email form).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: zilty4

Please Log in to join the conversation.

13 years 2 months ago #153700 by zilty4
Dear Support,

As said previously, I want to EXclude addresses with %@foo.foo, not to INclude them.

I was told not to use !=, and use LIKE, but there is no option to NOT LIKE.

If I use LIKE !@foo.foo it EXcludes all emails ---979 of them.

If I have no filter I get 979.

There are only about 2-300 good emails. That is what I would like to send to.

Hope you can help. site is at fcat-nc.org.

Thank you.

Please Log in to join the conversation.

13 years 2 months ago #153737 by krileon
I see, this is not a problem but you can not do it through basic filtering. You'll need add the below advanced filter.

FIELD NOT LIKE %@foo.foo

or

FIELD NOT LIKE %foo%


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 2 months ago #153873 by zilty4
OK. Have tried to use advanced search with string

But get:
=============
JDatabaseMySQL::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%@foo%)' at line 6 SQL=SELECT COUNT(*) FROM jos_comprofiler ue, jos_users u WHERE u.block = 0 AND ue.approved = 1 AND ue.confirmed = 1 AND u.gid IN (18, 30) AND u.`id` = ue.`id` AND

===>>> (email NOT LIKE %@foo%) <<<===
Also: email NOT LIKE %@foo.foo
And with email and or %@foo... in back quotes.

Still no happiness; I either get no records or all 980 of them.


Call stack
# Function Location
1 JSite->dispatch() /home/fcat-nc/public_html/index.php:68
2 JComponentHelper->renderComponent() /home/fcat-nc/public_html/includes/application.php:124
3 require_once() /home/fcat-nc/public_html/libraries/joomla/application/component/helper.php:162
4 usersList() /home/fcat-nc/public_html/components/com_comprofiler/comprofiler.php:102
5 cbUsersList->drawUsersList() /home/fcat-nc/public_html/components/com_comprofiler/comprofiler.php:781
6 CBdatabase->loadResult() /home/fcat-nc/public_html/administrator/components/com_comprofiler/library/cb/cb.lists.php:304
7 JDatabaseMySQL->loadResult() /home/fcat-nc/public_html/administrator/components/com_comprofiler/library/cb/cb.database.php:733
8 JDatabaseMySQL->query() /home/fcat-nc/public_html/libraries/joomla/database/database/mysql.php:355
9 JError->raiseError() /home/fcat-nc/public_html/libraries/joomla/database/database/mysql.php:231
10 JError->raise() /home/fcat-nc/public_html/libraries/joomla/error/error.php:171
11 JException->__construct() /home/fcat-nc/public_html/libraries/joomla/error/error.php:136
=============

Please Log in to join the conversation.

13 years 2 months ago #153888 by krileon
You need to have u.`email` NOT LIKE '%@foo%'. The NOT LIKE comparison string needed to be surrounded in single quotes. I was simply giving you an example in my previous thread. I HIGHLY recommend becoming more familiar with MYSQL by reviewing the below tutorials and documentation.

www.w3schools.com/sql/default.asp
dev.mysql.com/doc/refman/5.0/en/index.html


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.247 seconds

Facebook Twitter LinkedIn