The best WP API solution for this goal is to use the delete()
function to remove a row.
A small example, to delete the raw ‘ID’ in the custom table ‘eLearning_progress.’
$id = 0815;
$table="eLearning_progress";
$wpdb->delete( $table, array( 'id' => $id ) );
But I can’t see which raw you will delete in your table eLearning_progress
? Maybe you enhance the question to understand it much better.
Related Posts:
- get_results on large datasets
- Is there a (better) way to access $wpdb results?
- Using $wpdb generates DB error
- How do you use prepare when asking for a list of id’s
- how to execute different sql query in non-sanitized $wpdb->get_results function
- WPDB update row with != in where clause
- How to update records using $wpdb?
- Need help writing a $wpdb query
- show badge with count for pending items in custom post type
- WP Sql query multiple where clause
- WordPress SQL query – returning ‘true’ ‘false’ or ‘null’
- Modify the structure of data returned by $wpdb
- Syntax for $wpdb->prepare when searching in two columns
- Confused by $wpdb->prepare
- How to display user_nicename and usermeta values by custom query in WordPress?
- Optimizing WordPress Queries – Removing Group By ID
- How can I combine one field using wpdb and group by?
- $wpdb->prepare with ON DUPLICATE KEY UPDATE
- how to use $wpdb->prepare to update a custom table
- WPDB Placeholders and second argument for prepared statements
- Increment integer field in database when WHERE needs to be dynamic [closed]
- Custom SQL query ORDER BY term_order
- Custom $wpdb returns unexpected time based results
- How to left join meta in queries [closed]
- wpdb->get_row is selecting the variable as a column name
- CREATE TABLE with dbDelta does not create table
- $wpdb query outputs php code instead of executing it
- wpdb query not working
- WordPress wpdb->insert returns int(0) => doesn’t insert anything, no errors!
- WPDB SQL Ignore `post_status` Parameter
- how to list all post that are in the custom taxonomy using $wpdb
- WPDB SQL query SELECT from category
- How to use WHERE NOT EXISTS query to avoid duplicate entry using $wpdb to save in custom table?
- Creating an Angular factory from custom database table
- wpdb->update update the entire table instead of one row
- How do I update post based on meta_key in another table?
- How to set up prepared query using IN statement
- Custom database query to validate data
- Alter the main search query to search posts by coauthor user name
- Creates only one table and not the other
- Protect custom form from SQL injection
- looking for a way to allow users to backup the plugin db data(save as)
- SQL Query to select post title & post ID from a particular category
- Get comments after specific date
- query using wpdb in wordpress gets me no result
- Get count of rows based if column exists in two different tables
- query_vars doesn’t return query string (trying to get data from $wpdb)
- WordPress 4.8.1 uses mysql_connect which doesn’t work with PHP 7
- Does $wpdb->prepare not create a prepared statement that I can execute multiple times?
- wpdb get posts by taxonomy SQL
- Display data from a non wordpress database on a page template
- Get data from database table by post_id to get data from second database table
- Getting users who registered 360 days from current date
- Querying Email Addresses for a List of Users with Same Last Name?
- $wpdb sql help. Select post id and post meta value based on 2 other post_meta values
- $wpdb prepared with search term
- Really simple query giving error in SQL syntax
- I want to update my postcontent with $wpdb
- How to save html and text in the database?
- $wpdb->replace / Replace or update primary key
- Create an array with a string key from wpdb->get_results
- Replicating the WP_Query ‘s’ param with $wpdb
- get the number of queries made on a page(inside my plugin)
- Doing a loop with multiple DBs simultaneoulsy
- WPDB If primary key already exists, add +1 to integer field
- How to get an array of user roles with or without a specific capability?
- Programmatically Creating Page using $wpdb and getting 404 error
- Create table from array with prepare
- 301 Redirect Code
- $wpdb->insert inserting only f character in custom table
- Why does wpdb->update delete other meta?
- Make a SQL query with wpdb in WordPress
- Getting variable from Database
- $wpdb->prepare was called incorrectly when inserting multiple records
- How to protect a script execution on WordPress?
- PHP -> SQL Query with Summing
- How to delete a particular row in a database table
- Get emails from users by custom field SQL
- Save sql file after doing insert wpdb
- Can I use wpdb to insert query results into a post?
- Getting value from database table depending on field value
- $wpdb->prepare error after WordPress update [duplicate]
- Can’t find out why dbDelta dosen’t create my table
- How to pass an input value into wpdb->Prepare
- WordPress SQL Prepare
- wpdb replace returning 1 where delete and insert is expected
- update_post_meta not working in template_redirect action
- How to work with constraints on wordpress user metadata?
- Help posting values to DB on submit using $wpdb->query
- $wpdb post type and term query only works when there are no dashes or spaces in the term slug and title
- Get 3 row ID’s via ARRAY_A
- Getting record from three wpdb tables
- wpdb insert working in one function, but not another
- wpdb select from using array as search parameters
- Can’t get expected result from a wpdb query
- Convert a WP Query into a simpler SQL query to fetch only COUNT of posts
- selecting row using wpdb which contain special symbols
- Query Problem in Clustom Plugin
- Table wont load into WPDB
- WPDB prepare – like % – placeholders?