Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Deleting products in Mysql


Wisha

Recommended Posts

Hello, can anyone tell me how to delete multiple products from within MySql? Each couple of weeks I have a list of about 30-40 products which have become discontinued and therefore I need a way to easily delete these from the database. Its far to slow to do this within the admin tool.

 

Any help would be much appreciated!

 

Will.

Link to comment
Share on other sites

Hello, can anyone tell me how to delete multiple products from within MySql? Each couple of weeks I have a list of about 30-40 products which have become discontinued and therefore I need a way to easily delete these from the database. Its far to slow to do this within the admin tool.

 

Any help would be much appreciated!

 

Will.

 

I don't think there's a quick way to do it, unless all of the products you want to delete have some common field data. Example, the products_model is all the same for the products to delete. Or maybe products_status is the same. You could change the Status to inactive in admin (faster then deleting) for all your products, and then every few months run a query to delete products where products_status = 0. If you do, don't forget to also delete the associated records (based on product_id) in product_description and ... there's another table as well I think.

 

Might be easier to just delete them from Admin as needed. :)

Link to comment
Share on other sites

Maybe create a custom "Quick Delete" script that presents the products in a checkbox list with a "delete records" button...mass delete products :)

 

Good idea Chemo! I didn't think of it because I would have no idea (well a little idea) how to do it. Wisha, you should have Chemo to do a custom programming job for this, I hear he's da-man. :)

Link to comment
Share on other sites

right, however he said he wanted to do a mass delete of the products, and you can modify the code from there . . is why i said you can take code from there . .

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...