I would just modify Q Studio example to:
global $wpdb;
$table = $wpdb->prefix . 'table_name';
$delete = $wpdb->query("TRUNCATE TABLE $table");
Related Posts:
- Delete tables from database when deleting plugin
- How can I delete orphan keys in WordPress database tables?
- Using Vagrant for customizable WordPress Multi-sites [closed]
- clean wp_options table unused rows
- Doubt using $wpbd->get_col for a single column
- Access WordPress database outside of WordPress
- Help With MySQL to WPDB Query Conversion
- Create a table with wordpress plugin boilerplate
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- WPDB: Update table
- Issue running db create table query from static method
- Add some fileds to the wp_posts table
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- How to access the WordPress DB from a plugin file
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- Integrating Custom Database with WordPress
- $wpdb->delete not working for me
- How to securely controlling data without keeping it in postmeta?
- How to fix slow comment query?
- Write mysql credentials in plugin
- get_var result empty for query of custom table in plugin admin
- Pull Data from DB for Admin Page Display as Relates to Admin Page Class by BA Internet
- Posts are deleted everyday at night
- Is it safe to increase/alter the size of the wp_post.guid column from VARCHAR(255) to VARCHAR(2048)?
- OpenID for WordPress 3.x? [duplicate]
- Get a button for in the Editor
- How to store ACF custom fields data in a custom table
- WordPress plugin DB upgrade
- Image Crop/Resize Function/Code Sinppet/Plugin to adjust/crop images during upload
- WP get_permalink Return Wrong URL
- How to add product images using script?
- Setting up widgets in wordpress with a unique ID for the after_title argument
- MailChimp integration that allows users to select from multiple lists [closed]
- Ajax with jQuery UI dialog not working
- Use plugin or custom post type for game score functionality
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- Copyright messages for a particular set of pages
- Is the wordpress user-model changed in wpmu?
- Creating Tables on Network Activation
- Where to hook my plugin’s action
- how to load the language file in plugin?
- View Private Published Page with URL Code (no login required)
- Translating long texts with html formatting
- Does any one have Idea to get these functionalities with the plugin wp-multi-network
- custom payment gateway in woocommerce failed to connect to remote api server
- Send reply with pre-prepared answers
- $wpdb->replace: WHERE?
- $wpdb->get_row returns column name instead of column value
- Anspress Customization: How to show logged in user votes on a single answer?
- How create Group Blogs based on user created Groups
- WordPress and a secondary database?
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- date/time-picker and file upload (image) fields for custom fields (e.g. with more fields)
- Inserting custom PHP script on homepage
- Best practice for including plugin output in a template without using shortcode?
- Gathering and logging data from a plugin: how to do it without race conditions?
- How to pass the API key to the client from the database? [closed]
- a weird attribute on every html tag
- dbDelta not adding additional columns in plugin database update
- How to change the wp_upload_dir() path in plugin
- How to edit a published post?
- Plugin has added weird data in wp_options, set to autoload
- Advanced WordPress plugin activation detection
- how to change wp-admin url using function file
- Calling a save function from a “submit” button
- Is there a way to easily manage Project options (custom-fields)
- Renaming Custom Taxonomy Values
- WordPress plugin: efficient way to store large data
- Add a “default sorting” menu to child store pages
- Plugin code will not work properly inside a class [closed]
- Is this plugin safe to run?
- Rename Smart YouTube’s httpv back to http for all posts
- WordPress FLIR (Facelift Image Replacement) plugin clipping off end of text
- How to make PDF books readable on site with woo-commerce?
- create pages automatically and dynamically in wordPress
- Why does plugin_url append absolute file path?
- Programmatically generate new pages for a site based on page template and content elements accessed via DB
- Remove special characters from filenames
- Custom Icon assigned to menu items not working for multi-site networks
- How can I save cookies to members
- Overwrite user role
- Place content inside the Post Loop
- Should I paste CDN links in a JS file or use a Bootstrap CDN plugin?
- Problem with Duplicate Meta / tag description in Webmaster Tool [duplicate]
- Include plugin form in the home page
- Restrict my pages from public
- Is saving multiple options or saving multiple items in one option better?
- Style WordPress Custom Post Type Single Page
- How to maintain WordPress permalink structure with custom content with URL parameters?
- Collaborate on wordpress local website, share files via dropbox?
- Is there a way to include some external script to some or all pages in a wordpress site?
- Making a particular kind of search engine with WordPress?
- AdBlock blocks my non-advertising sidebar images [closed]
- WordPress Customise
- Looking for membership style plugin with edit option [closed]
- register_activation_hook not working
- Create Custom Coupon Type
- Text Wrapping in WPDataTables
- Using ACF to allow user to add and edit multiple saved forms