Created
March 26, 2018 09:15
-
-
Save stilografico/ab61371f0623653fea9224dc849fe4c3 to your computer and use it in GitHub Desktop.
GRAVITY FORMS CLEANUP Delete orphan entries from rg_lead_detail_long
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
| /*GRAVITY FORMS CLEANUP*/ | |
| Delete orphan entries from rg_lead_detail_long | |
| SELECT * FROM wp_rg_lead_detail_long | |
| LEFT JOIN wp_rg_lead_detail ON (wp_rg_lead_detail_long.lead_detail_id = wp_rg_lead_detail.lead_id) | |
| WHERE (wp_rg_lead_detail.lead_id IS NULL) | |
| DELETE wp_rg_lead_detail_long FROM wp_rg_lead_detail_long | |
| LEFT JOIN wp_rg_lead_detail ON (wp_rg_lead_detail_long.lead_detail_id = wp_rg_lead_detail.lead_id) | |
| WHERE (wp_rg_lead_detail.lead_id IS NULL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment