function my_plugin_remove_database()
{
global $wpdb;
$db_table_name = $wpdb->prefix . 'sandbox'; // table name
$sql = "DROP TABLE IF EXISTS $db_table_name";
$rslt=$wpdb->query($sql);
}
register_deactivation_hook( __FILE__, 'my_plugin_remove_database' );
Related Posts:
- What are the common security flaws I need to look for? [closed]
- Making my plugin multi-site compatible
- Creating 20,000 Posts or Pages using a .csv file?
- What’s the easiest way to duplicate an entire navigation menu?
- Updating WooCommerce variable product stock issue
- How can I get a list of plugins and which blogs are using them?
- What is the easiest way to implement cascading database upgrade for my plugin?
- Plugin Development sqlite or WordPress’ database
- Retrieving a Value from a wp-database
- Problem with creating tables for Plugin
- Prevent duplicate records in plugin table
- WordPress WPforms customization
- How do I run SQL queries on a WordPress web page? [closed]
- Migrating to WordPress Recipe Plugin and Some SQL Issues
- How to create multiple database tables on plugin activation?
- Does deleting a Plugin via the WordPress admin ‘completely’ remove the code?
- Speeding SQL queries for a large database?
- correct validate and sql query
- correct sql query
- SQL query, error
- $wpdb update query in plugin only updating one column
- Woocommerce Backend Search by Title and SKU
- problem with sql query
- Using AJAX to run SQL statement and populate dropdown
- Adding CASE in WP_Query
- JOIN and SUM different statement results (Mailster Database)
- How to get specific column data conditionally in database in WordPress?
- Memcaching recurring SQL Queries
- add products to WordPress site automatically
- How to get database connection details without longing to cpanel in WordPress?
- Performing CRUD operations on front end in wordpress
- Display a number value from mysql query in WP
- Looping the data from WordPress database using foreach
- How To Toggle User_Meta in frontend in a form using PHP
- Get and Update Most Meta Value as an array in HTML form
- WordPress filter from custom table is not working properly
- errno: 150 “Foreign key constraint is incorrectly formed” [closed]
- Create Array from data in the OPTIONS table
- Custom Table doesn’t create on plugin activation
- correct validate inputs
- Get all the related data from WordPress DB
- How to change and edit users according to the extension in the URL
- Help making my pagination plugin better
- Having Multiple authors for the same WordPress Plugin
- How can a plugin run a script after being updated in MultiSite?
- File Storage Plugin (For Individual Users)?
- Pass A Value From Outside To A Plugin Variable
- Add query string to plugin URL
- How to add a privacy-checkbox in comment-template?
- Can plugin variables cause conflict?
- Events plugin for theater (event = performance of a production)
- What are the benefit in adding hook in the init() hook?
- Force [wordpress_social_login] shortcode to display where it is embedded [closed]
- How to hide plugin from WordPress Multisite admin plugin list
- Unable to install theme recommended plugins on Multisite
- WordPress URL redirect
- Getting selected (highlighted) html from the Visual Editor on Edit Post page?
- Accidentally Broke Site (Please Help) [closed]
- How to query the custom fields by language?
- Any recommendation on how to manage ads?
- List taxonomy terms for post as checkboxes
- Plugins not showing in Multisite dashboard
- Why Is This Code Causing The Admin Bar to Disappear?
- WordPress stripping away backslashes from HTML
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- How to apply next/previous classes to LIs for pagination links?
- Socialite WP plugin, unable to obtain API keys from FB
- Include a php file from another plugin
- Too many login attempts
- Can the uniqueness of the plugin file/plugin slug and version number be trusted?
- How can I fetch data from another website to my wordpress website with mysql database
- How to translate WP Blog (search, category etc.)?
- How can I concatenate variables to search results title? [closed]
- Large amount image data transfer
- translate “load more” button
- Redirect logged in user to somepage on every page view?
- Add the_post_thumbnail_url to a shortcode in function.php
- Override translation of 1 word
- merge wordpress plugins
- quicktag breaking FancyBox plugin on my blog’s front page
- How to write to the plugin’s directory?
- Modify pages widget and make a plugin?
- Ajax call not working in wordpress through a plugin
- Custom plugin places html head content in body
- Navbar affect loading all products
- Setting Author on CPT
- “SyntaxError: Unexpected end of JSON input” in WordPress checkout – how to debug?
- Custom WordPress feed on Apache server returning 304 response for if-modified-since
- How to create algorithm for ordering posts in WordPress?
- the option to delete plugins is not there, I can’t download plugins either
- Cannot install plugins
- Add subemenu option page
- WordPress Background Audio – Continous AutoPlay
- Being notified when some YouTube video in some post becomes unavailable
- Remove ‘Publish to Facebook’ checkbox for Facebook page publish plugin
- Why do I get this “peer’s certificate issuer not recognised” error when trying to install a theme?
- _e in wordpress +
- how to restore wordpress backup(.rar) manually?
- Questions about using Disqus or Jetpack for comments [closed]
- Any plugin/theme available which suits my requirement? [closed]