diff --git a/api/Products.php b/api/Products.php index 06590a9..a457353 100755 --- a/api/Products.php +++ b/api/Products.php @@ -414,7 +414,7 @@ public function delete_product($id) } // Удаляем товар из связанных с другими - $query = $this->db->placehold("DELETE FROM __related_products WHERE related_id=?", intval($id)); + $query = $this->db->placehold("DELETE FROM __related_products WHERE (related_id=? OR product_id=?)", intval($id), intval($id)); $this->db->query($query); // Удаляем отзывы