Skip to Content Skip to Menu

[SOLVED] need SQL to put into the CB List so I can get accurate list of Active CBsubs users

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
9 years 3 months ago - 8 years 5 months ago #269542 by ThePiston
For years I have tried using the cb_fields plugin to ensure that a user was set to Active= Yes when a user subscribed or renewed, but somehow this has become very innacurate.

I wish we had something in CB Lists where I could select "CB plans = Active" like in backend.

What can I put into the Advanced area of the CB Lists where I can get all Active CBsubs users into a CB List?

thanks

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 8 years 5 months ago by beat.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
9 years 6 days ago #273827 by krileon
The below usage can be used to filter a userlist to only show active subscribers.

www.joomlapolis.com/forum/277-cbsubs-gpl-support/227615-user-lists-by-subscription#255712


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 or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
9 years 6 days ago - 9 years 5 days ago #273834 by ThePiston
tried this and getting a 1054 SQL error:
Code:
sub.`user_id` = u.`id` AND sub.`status` = 'A'

Unknown column 'sub.user_id' in 'where clause' SQL=SELECT COUNT( DISTINCT u.id ) FROM j17_users u JOIN j17_user_usergroup_map g ON g.`user_id` = u.`id` JOIN j17_comprofiler ue ON ue.`id` = u.`id` WHERE u.block = 0 AND ue.banned = 0 AND ue.approved = 1 AND ue.confirmed = 1 AND g.group_id IN (6, 7, 2, 3, 4, 5) AND ( sub.`user_id` = u.`id` AND sub.`status` = 'A' )


CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 9 years 5 days ago by ThePiston.

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

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
8 years 10 months ago - 8 years 10 months ago #276789 by ThePiston
any help?

same error with this

j17_cbsubs_subscriptions.`user_id` = u.`id` AND j17_cbsubs_subscriptions.`status` = 'A'


CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 8 years 10 months ago by ThePiston.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48548
  • Thanks: 8290
  • Karma: 1445
8 years 9 months ago #278348 by krileon
The exact usage is directly in the below post.

www.joomlapolis.com/forum/277-cbsubs-gpl-support/227615-user-lists-by-subscription#255712

You need to directly copy and paste that entire query string as your Advanced filter for your userlist. I'm not sure why you only took the WHERE statement from it.


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 or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
8 years 9 months ago #278353 by ThePiston
yes, thanks, working

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum