NOTE TO MODS: I had major problems writing this response hence why it's over numerous posts. Feel free to combine them if you want.
rodsdesign,
I couldn't wait for the "well we might put it in a future release" either, so here is how I addressed it:
Notifing administrators of impending expirations
Get SQL2Excel Pro - it is not very expensive at all and a very nifty bit of kit
Set up your sections and categories however you want, then create the worksheets you require.
For my client, they wanted All members, expiring in 7 days, expiring in 14 days, Expiring in 1 month which uses the following:
All users
[code:1]
SELECT comp.user_id, comp.firstname, comp.lastname, comp.approved, comp.confirmed, comp.lastupdatedate, comp.twittername, comp.cb_organisationname, comp.cb_address1, comp.cb_address2, comp.cb_address3, comp.cb_address4, comp.cb_town, comp.cb_county, cb_postcode, cb_telephone, cb_faxnumber, cb_website, cb_secondwebaddress, cb_employees, cb_shortdescription, comp.cb_businesscategories, comp.cb_referralsource, comp.cb_subs_inv_first_name, comp.cb_subs_inv_last_name, comp.cb_subs_inv_payer_business_name, comp.cb_subs_inv_address_street, comp.cb_subs_inv_address_city, comp.cb_subs_inv_address_state, comp.cb_subs_inv_address_zip, comp.cb_subs_inv_address_country, comp.cb_subs_inv_contact_phone, comp.cb_subs_inv_vat_number, subs.user_id, subs.status, subs.plan_id, subs.subscription_date, subs.last_renewed_date, subs.expiry_date, subs.previous_expiry_date, subs.previous_status
FROM jos_comprofiler comp, jos_cbsubs_subscriptions subs
WHERE comp.user_id=subs.user_id
ORDER BY comp.user_id
[/code:1]
Expiring in 7 days
[code:1]
As above but with
WHERE comp.user_id=subs.user_id AND subs.expiry_date <= date_add(NOW(),INTERVAL 7 DAY) AND subs.status='A'
ORDER BY comp.user_id
[/code:1]
Expiring in 14 days
[code:1]
As above but with
WHERE comp.user_id=subs.user_id AND subs.expiry_date <= date_add(NOW(),INTERVAL 14 DAY) AND subs.status='A'
ORDER BY comp.user_id
[/code:1]
Expiring in 1 month
[code:1]
As above but with
WHERE comp.user_id=subs.user_id AND subs.expiry_date <= date_add(NOW(),INTERVAL 30 DAY) AND subs.status='A'
ORDER BY comp.user_id
[/code:1]
The above can be created into a workbook to send a list to the admin's of the users that are due to expire in the future.
Post edited by: RCheesley, at: 2010/06/11 18:00