Forums / Setting Up Categories, Products, Attributes / mass delete manfacturers with no products

mass delete manfacturers with no products

Locked

Views: 1,483

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
4 Dec 2010, 2:57 PM
#1
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

mass delete manfacturers with no products

I could not find a thread regarding this issue. Please redirect if you do. Sorry...

I would like to do a mass SQL delete of manufacturers with no products. I do not know SQL.

Does anyone know how to do this? And if it could cause any other problems?

I deleted a lot of products and no longer need manufacturer.

Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

4 Dec 2010, 8:08 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: mass delete manfacturers with no products

As always, make sure you have a good backup of your database, then run this via Admin > Tools > SQL Patch

DELETE FROM manufacturers WHERE manufacturers_id NOT IN (SELECT DISTINCT manufacturers_id FROM products WHERE manufacturers_id IS NOT NULL);

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

4 Dec 2010, 8:21 PM
#3
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: mass delete manfacturers with no products

kuroi:

As always, make sure you have a good backup of your database, then run this via Admin > Tools > SQL Patch

Worked Perfect!!!:clap::clap:

Thank you so much! Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com