ollyno1uk2 Posted January 17, 2007 Share Posted January 17, 2007 Hi there I currently have 2000 products with a status of 0 that are clogging up my database. I would like to delete them. Can I jsut delete them from the products table or would they need to be removed from products, products_description and products_to_categories? Would something like this work as an SQL? delete from products, products_description, products_to_categories where products.products_status = 0 Thanks Link to comment Share on other sites More sharing options...
davidinottawa Posted January 17, 2007 Share Posted January 17, 2007 Hi there I currently have 2000 products with a status of 0 that are clogging up my database. I would like to delete them. Can I jsut delete them from the products table or would they need to be removed from products, products_description and products_to_categories? Would something like this work as an SQL? delete from products, products_description, products_to_categories where products.products_status = 0 Thanks You don't have to specigy the other tables. products is the parent, and the rest of the child(ren) of products. It will do a cascading delete if you simply type : delete from products where products_status = 0 david Link to comment Share on other sites More sharing options...
ollyno1uk2 Posted January 17, 2007 Author Share Posted January 17, 2007 You don't have to specigy the other tables. products is the parent, and the rest of the child(ren) of products. It will do a cascading delete if you simply type : delete from products where products_status = 0 david Ok thanks very much. I will give it a try! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.