Images

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 years ago
When I delete an item, remains the product image in the database. Is it possible to delete the orphaned images automatically from the database?
14 years ago
Whenever a product is deleted it does not actually get deleted from the database, but a flag Deleted is set to true, hence the deletion is not physical.

The statement to check for real orphaned images would be something like:


SELECT PictureID
FROM Nop_Picture
EXCEPT
SELECT PictureID
FROM Nop_ProductPicture
EXCEPT
SELECT PictureID
FROM Nop_Category
EXCEPT
SELECT PictureID
FROM Nop_Manufacturer
EXCEPT
SELECT PictureID
FROM Nop_ProductVariant


If you haven't done anything unusual such as deleting products by hand in the DB you probably won't get any results.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.