Hi I am trying to drop some tables in bulk before creating them again for testing purposes.
I am trying to run this statement
dbDelta( "SET GROUP_CONCAT_MAX_LEN=10000; SET @tbls = (SELECT GROUP_CONCAT(TABLE_NAME) FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'wp_test' AND TABLE_NAME LIKE 'mch_%'); SET @delStmt = CONCAT('DROP TABLE ', @tbls); PREPARE stmt FROM @delStmt; EXECUTE stmt; DEALLOCATE PREPARE stmt;", $ wpdb->prefix )
But nothing happens, my plugin gets activated with no errors, but the tables are still there.
I am new to this stuff, so I would like to understand the proper way to do this.