I see there is no way in MySQL to drop tables using wildcards like 'temp_%', this simple PHP will help us do the following.

1. specify databases like 'anything%', so you check only the databases you need to.

2. specify tables like 'temp_%' , 'temp3_%' in an array so any number of temp wildcards possible.

3. loop through all databases and tables matching to drop the temp tables.

This makes it easy for you dropping many temp tables but be very careful about the wildcard, things may go completely wrong if you get the wildcard wrong.

Project Samples

Project Activity

See All Activity >

Categories

Database

Follow MySQL DB Cleanup Script

MySQL DB Cleanup Script Web Site

Other Useful Business Software

Both Apple and Google’s ‘Best App’ Password Manager Both Apple and Google’s ‘Best App’ Password Manager Icon
Both Apple and Google’s ‘Best App’ Password Manager Icon

Still writing down passwords? Or rotating between a handful that you can remember? Not safe! Get Dashlane, It’s FREE!

With all the accounts you have, remembering every single password is impossible. Dashlane protects your passwords and creates an easy, secure way to access all of your accounts on any device you own.

Rate This Project

Login To Rate This Project

User Reviews

Be the first to post a review of MySQL DB Cleanup Script!

Additional Project Details

Intended Audience

Advanced End Users, System Administrators, Developers

User Interface

Web-based

Programming Language

PHP

Database Environment

MySQL

Registered

2012-02-26