Use Superset/MySQL to Chart Changes in s2member ccaps

Hi everyone,

I’m new to s2member and really appreciate it. Using a MySQL query, I would like to pull the data from the s2member_access_cap_times meta_value and chart the times that a user’s role changes over time. For example, I want to create a chart in Superset that shows how many users have changed their level from 3 to 0 from year to year. I am not an expert in MySQL queries either so any guidance would be greatly appreciated. Is what I want to do even possible? If so, what is the best way to go about this?

Thanks for any help you can give.

Alex

1 Like

Hi Alex.

Welcome to the community! It’s good to have you. :slight_smile:

Yes, what you said is possible. I’m actually planning to create a viewer for the access cap times data. So yes, it can be done. And with the data then you can use the visualization library, whether that is Superset, D3.js, or some other similar.

You may find this helpful:
2member/src/includes/classes/access-cap-times.inc.php
c_ws_plugin__s2member_access_cap_times::get_access_cap_times($user_id)