List of members in age range?

11 years 9 months ago #207725 by fribse2011
Replied by fribse2011 on topic Re: List of members in age range?
Works like a charm, thanks!!!

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

11 years 9 months ago #207727 by fribse2011
Replied by fribse2011 on topic Re: List of members in age range?
How do I use the YEAR (NOW) to check if the year is in a list of years? (multiselect list of years)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

11 years 9 months ago #207730 by krileon
Replied by krileon on topic Re: List of members in age range?
Don't understand what you're wanting to do. YEAR( NOW() ) gives you the current year. Not the year of the user. Are you wanting to check that the current year is in a multiselect fields values (which are years)?


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.

11 years 9 months ago #207731 by fribse2011
Replied by fribse2011 on topic Re: List of members in age range?
Yes, I have a multiselect list of years (the years they have paid their membership in), and I would like to see a list of users that does NOT have the current year in the multiselect.

My simple statis is just a
cb_betalt != '2012'
And that wrks apparently, but I would of course like to have it work in more than just this year ;-)

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

11 years 9 months ago #207747 by krileon
Replied by krileon on topic Re: List of members in age range?
The below Advanced filter should do the trick.

FIND_IN_SET( YEAR( NOW() ), REPLACE( ue.`cb_betalt`, '|*|', ',' ) )

Please understand while I am providing this now don't become accustomed to expecting this. This is outside the scope of support and if this becomes more complex (takes me more than 5mins) you will need to hire a database expert to write the queries for you. Additionally you can find all this information in MYSQL documentation below.

dev.mysql.com/doc/refman/5.6/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.
The following user(s) said Thank You: fribse2011

Please Log in to join the conversation.

11 years 9 months ago - 11 years 9 months ago #207757 by fribse2011
Replied by fribse2011 on topic Re: List of members in age range?
Hi Kyle

I'm very well aware of this, and appreciate this immensly.
I appreciate the pointers to the db as well, if I need any further tweeks, I will seek out consultants, thanks!

Now what I understand from the above is that you replace all | with , and then search the string for the current year, and return either a number or NULL?

This gives me the members who have paid, and my hope is that that list is going to be quite a bit longer than the members who havent paid.

I changed it to

(FIND_IN_SET( YEAR( NOW() ), REPLACE( ue.`cb_betalt`, '|*|', ',' ) )<1)

And that seems to give me the correct result, is that the correct thing to do, or is there a better way?

Best regards
Fribse

Frømandsklubben Nikon, www.nikondyk.dk
We're a volunteer driven diving club in Ishøj, Denmark.
Har du brug for en dykkerklub der rummer alle, så kom ned til os.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.222 seconds

Facebook Twitter LinkedIn