Skip to Content Skip to Menu

[SOLVED] User List Filter (advanced)

9 years 9 months ago - 9 years 9 months ago #257097 by tjohns92109
[SOLVED] User List Filter (advanced) was created by tjohns92109
I was wondering if you could maybe provide a little help with the advanced filter on the user lists...

I need to check if one field is equal to 'yes' (cb_departurevaries)... and if so, I need to check the date field (cb_departuredate) and only display if the date greater than the current date.

Is that even possible? Or at least just to check it against the date to make sure it isn't expired?

Thanks!
Last edit: 9 years 9 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48479
  • Thanks: 8283
  • Karma: 1443
9 years 9 months ago #257175 by krileon
Replied by krileon on topic User List Filter (advanced)
Advanced Filter adds directly to the WHERE statement of a userlist query. So you need to write SQL to accomplish what you're wanting. In your case you'd have something like the below.

Code:
`cb_departurevaries` = 1 AND `cb_departuredate` > NOW()

Please see the below SQL tutorial and MYSQL documentation for further usage information.

Documentation:
dev.mysql.com/doc/refman/5.6/en/index.html

Tutorials:
www.w3schools.com/sql/default.asp


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: nant

Please Log in or Create an account to join the conversation.

9 years 9 months ago #257327 by tjohns92109
Replied by tjohns92109 on topic User List Filter (advanced)
Much appreciated. As soon as I have a chance, I'll read though the MySQL documentation and paste the exact argument I needed along with the custom SQL command in case it will help someone else.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum