I just discovered I have 1700+ tables with the table name "wp_x_subscriptions_log_table". Many of these are clearly orphans left behind after deleting blogs.
Can someone please help me write a query to safely delete these tables?
This will find them all:
SELECT * from INFORMATION_SCHEMA.TABLES where TABLE_NAME like '%subscriptions_log_table%';
How can I add variables to only find these tables that do NOT have a blog_id FROM wp_blogs? Or, any other way?