Created
March 22, 2018 14:36
-
-
Save andrewlimaza/34b23d4b19346a753ad274785dbe4178 to your computer and use it in GitHub Desktop.
Example to see all user's that cancelled within 7 days SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $wpdb; | |
$results = $wpdb->get_results( "SELECT * FROM $wpdb->pmpro_memberships_users WHERE status='cancelled' AND enddate IS NOT NULL AND DATE_ADD(startdate, INTERVAL 7 DAY) >= enddate AND membership_id='1'" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment