I have this query:
SELECT *
FROM product
inner join product_category_r on product_name=pc_product_fk
inner join category on pc_category_fk=category_name
WHERE category_name='$category'
When I delete one product from product table. The all products of that category are not shown. And from product_category_r table, the productname and category name is also deleted. But I am not deleting any record from product_category_r. Here is my delete query:
DELETE FROM product WHERE product_id='$id'