Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unlinked products in database - removal?


Bordersbloke

Recommended Posts

Due to some contrib I installed a while back, which was buggy, it seems that several times I did a bulk delete to remove categories full of products, the products were unlinked from the shop database but the data for those products still remains in the database under the Products, Products_description etc tables.

 

These products don't show up if searched from within Oscommerce shopfront or admin, but can be seen if the database is examined on the server.

 

I'm OK at PHP but not too clear on SQL queries - I'm wondering if there is an easy-ish way that I can run a query which would delete from the database any product which is not linked into the shop?

Link to comment
Share on other sites

Not clear what you mean with this

 

the products were unlinked from the shop database but the data for those products still remains in the database under the Products, Products_description etc tables.

 

If products appear in admin then they are in the database.

 

Select one of that "missing products" in he store front or admin. note the products_id in the url and then look for it in table "products" in your DB

Link to comment
Share on other sites

To clarify, the items are in the products table, but there is no way to show them on the website or in the admin area since they are not in the table products_to_categories which the site uses to reference the products.

 

There are many hundreds of them, on a site containing approx 16000 active products, so to manually find them is almost impossible.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...