Yes, you can use wpdb to delete the record in the custom table. Something like this in the wordpress function.
require_once ('../../../../wp-load.php');
if (!empty($_POST['id'])) {
global $wpdb;
$table="table_name";
$id = $_POST['id'];
$wpdb->delete( $table, array( 'id' => $id ) );
}
Related Posts:
- How to get specific table by current user login
- WPDB Insert or if exists Update
- Display data from a non wordpress database on a page template
- Inserting Post Meta From SQL
- How to execute mulitple statement SQL queries using $wpdb->query?
- How to query the WordPress database to get posts of a certain custom post type, taxonomy and field?
- Getting all the users who have author privilege
- wpdb_prepare with multiple or condition
- In what part of the WordPress core does the users table and usermeta table get joined?
- Modify Database in Multi-Site wp_usermeta table
- Create table from array with prepare
- WPDB SQL query with prepare() returning variable, not db value
- Best practice to import user base (subscribers) from one website to another?
- Clear Terms from Taxonomy for Specific Post IDs?
- Getting value from database table depending on field value
- Select From wpdb – Author/User Directory page
- Help posting values to DB on submit using $wpdb->query
- 2 $wpdb queries causing error Table ‘wp_postmeta’ is specified twice, both as a target for ‘UPDATE’
- Correct and secure way to access a custom SQL database in a custom PHP template file
- Oracle SQL query for Date format
- Using wpdb to connect to a separate database
- get_results using wpdb
- $wpdb won’t insert NULL into table column
- wpdb->insert multiple record at once
- How to define composite keys with dbDelta()
- Hook into $wpdb
- How does $wpdb handle COUNT(*)
- WordPress database error: [Query was empty] [closed]
- Efficiency on displaying random authors based on large database
- Change SQL get_results to search for posts with custom term in custom taxonomy
- wpdb query on custom table not working [closed]
- When and why should I use $wpdb different return types?
- How wordpress accesses its own database
- Using table lock with wp_insert_post?
- Error connecting to DB in /wp-includes/wp-db.php on line 1538 [closed]
- Set Display Name to first and last name (phpmyadmin SQL Query)
- How To Get Some Data From WordPress Database Using WordPress $wpdb Query?
- How to use a different database to list and manage comments in the backend
- Cannot update custom database table row
- Show last modified date of database
- $wpdb->insert is not working
- SQL Error wp_commentmeta – incorrect table definition
- Extracting the post_id via the wp_insert_post action (external db query)
- WordPress database error – Error in SQL syntax – I can’t identify any error?
- Why is it that not all users have a ‘session_tokens’ meta_key record in the usermeta table?
- Change WordPress prefix for only one table?
- How do I get the posts within a certain year/date(with sql query)?
- Multiple wp_options tables to share content across installs
- Select two sums with single get_var statement
- Is there a smart way to obtain a list of only some selected user meta data?
- Update from 4.5 to 4.6 failing
- Setup private content for specific users with daily updates [closed]
- MS Access to manage WordPress Database
- $wpdb->insert Giving duplicates
- Which data is written and stored in the database when read-only (non-posting, non-commenting) users visit the site?
- Have working sql query… trying to adjust it to use $wpdb
- Does WordPress store the username as a primary key in the database?
- multiple wordpress installation with shared usertable on an different database
- $wpdb->query can’t insert data
- Custom WordPress Table wpdb
- CreateOrUpdate in WordPress
- Problem migrating to localhost
- Is my way to change WordPress server is correct?
- How to get a list of WordPress default database tables?
- SQL query to set posts in bulk based on the post content
- Get emails from users by custom field SQL
- How to create more than one new wpdb object?
- Recovering the table wp_usermeta from users
- wpdb->insert not inserting first variable
- How do I have a user upload a blog post and then retrieve that to display in a card on the site?
- custom tables in wordpress Database? (can i just create them with sql?)
- Accidently changed the GUID
- How to escape percentage sign(%) in sql query with $wpdb->prepare?
- DB prefix not updating
- Migrate Users From laravel to wordpress
- Job and Employee Performance Tracking with Product Safety
- User input to database
- how add more field to wp user and save it to database
- Change user_nickname for author page link
- create a table using user meta custom data
- Is there a way for two deferent themes to consume two different DB on a same WP instance?
- How to add download link from database on custom page template?
- How to create index (sql) to a meta_key?
- How to get the id of recently registered user from database?
- insert data from a form:: Warning Empty query mysqli::query()
- How can I get $wpdb to show MySQL warnings?
- About wp database hooks (error establishing connection)
- $wpdb not working
- Accessing content from third party as native posts in WordPress
- Should I Use only wpdb Class to Write Custom Queries?
- Include post_status check within $wpdb query
- Hash user emails in database?
- using same mysql user with many databases
- Get id from database
- Pulling values from a sepcific row in table
- import (migration) user database to wp-users
- Insert Extra fields added in the front end registration form to DB
- Migrated to Namecheap, now Trouble with Database & wp-config [closed]
- $wpdb->insert not working for last select option
- WP Multisite Users Not Linking