Quote Originally Posted by mc12345678 View Post
the products_to_categories table, categories and products tables are effectively all inner joined requiring a record in all three that give at least one result when queried on the products_id. So if that product isn't in the products_to_categories table or if the categories table doesn't have a match to the products_to_categories table, then the query doesn't find any results and we get the falsey value that bypasses the attempt to delete.
Thank you for the details trouble shooting and explanation.

This is the issue, the product_id does not exist in the products_to_categories table. I can't say how the products were added, probably with Apsona. I'll write a custom query to delete the products for this client.

Much appreciated!