[SOLVED] Export Option in CBSubs

8 years 4 months ago #274583 by AlexRag
Replied by AlexRag on topic Export Option in CBSubs
Update:

I ended up using a similar extension (JDBExport) as the site I was working on is J2.x. The extension you suggested (looks good) was for J3.x sites only.

In any case, here is what I came up with and it seemed to work ok:

SELECT wxyz_comprofiler.user_id, wxyz_comprofiler.firstname, wxyz_comprofiler.lastname, wxyz_comprofiler.cb_housenumber, wxyz_comprofiler.cb_streetname, wxyz_comprofiler.cb_postalcode, wxyz_cbsubs_subscriptions.id, wxyz_cbsubs_subscriptions.status,wxyz_cbsubs_subscriptions. user_id, wxyz_cbsubs_subscriptions.plan_id, wxyz_cbsubs_subscriptions.subscription_date, wxyz_cbsubs_subscriptions.last_renewed_date, wxyz_cbsubs_subscriptions.expiry_date
FROM wxyz_comprofiler
INNER JOIN wxyz_cbsubs_subscriptions
ON wxyz_comprofiler.user_id=wxyz_cbsubs_subscriptions.user_id
WHERE wxyz_cbsubs_subscriptions.expiry_date BETWEEN CAST('2005-09-01' AS DATE) AND CAST('2014-10-02' AS DATE);

This gave me a spreadsheet with columns from the cbsubs_subscriptions.plan table as well as the associated user info from wxyz_comprofiler table.

Please Log in to join the conversation.

8 years 4 months ago #274612 by nant
Replied by nant on topic Export Option in CBSubs

AlexRag wrote: Update:

I ended up using a similar extension (JDBExport) as the site I was working on is J2.x. The extension you suggested (looks good) was for J3.x sites only.

In any case, here is what I came up with and it seemed to work ok:

SELECT wxyz_comprofiler.user_id, wxyz_comprofiler.firstname, wxyz_comprofiler.lastname, wxyz_comprofiler.cb_housenumber, wxyz_comprofiler.cb_streetname, wxyz_comprofiler.cb_postalcode, wxyz_cbsubs_subscriptions.id, wxyz_cbsubs_subscriptions.status,wxyz_cbsubs_subscriptions. user_id, wxyz_cbsubs_subscriptions.plan_id, wxyz_cbsubs_subscriptions.subscription_date, wxyz_cbsubs_subscriptions.last_renewed_date, wxyz_cbsubs_subscriptions.expiry_date
FROM wxyz_comprofiler
INNER JOIN wxyz_cbsubs_subscriptions
ON wxyz_comprofiler.user_id=wxyz_cbsubs_subscriptions.user_id
WHERE wxyz_cbsubs_subscriptions.expiry_date BETWEEN CAST('2005-09-01' AS DATE) AND CAST('2014-10-02' AS DATE);

This gave me a spreadsheet with columns from the cbsubs_subscriptions.plan table as well as the associated user info from wxyz_comprofiler table.


Great!

Thanks for posting back feedback on this.
The following user(s) said Thank You: AlexRag

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.440 seconds

Facebook Twitter LinkedIn