Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to delete all products woocommerce in phpmyadmin

DELETE relations.*, taxes.*, terms.*
FROM wp_term_relationships AS relations
INNER JOIN wp_term_taxonomy AS taxes
ON relations.term_taxonomy_id=taxes.term_taxonomy_id
INNER JOIN wp_terms AS terms
ON taxes.term_id=terms.term_id
WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type='product');
  
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product');
DELETE FROM wp_posts WHERE post_type = 'product';
Comment

PREVIOUS NEXT
Code Example
Php :: laravel database get all 
Php :: merge two arrays one as key to another php 
Php :: force delete soft delete laravel 
Php :: sum of columns laravel eloquent 
Php :: how to get local current time in laravel 
Php :: wherebetween date laravel 
Php :: installing apache mod php 
Php :: lat long in laravel validation 
Php :: fetch value from json link in php 
Php :: php error reporting 
Php :: how to build jquery messages notification with php and mysq 
Php :: laravel model created_at format edit 
Php :: add log in laravel 8 
Php :: Flutter Error - Migrate to android studio - MAC OS 
Php :: symfony redirect to previous page 
Php :: @include laravel 
Php :: laravel model with methos custom columns 
Php :: show random post in laravel 
Php :: php date object to timestamp 
Php :: change key with the value php 
Php :: reset password multipple database laravel 
Php :: how to get a whole number from decimal in php 
Php :: execute specific migration laravel 
Php :: ternary operator in php 
Php :: get_the_author_meta display name 
Php :: how to get data from a table in laravel 
Php :: remove all sessions in laravel 
Php :: get current time in php 
Php :: check if string starts with php 
Php :: datetime validation in laravel 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =