Skip to content

Commit

Permalink
fix sql remove related_products
Browse files Browse the repository at this point in the history
  • Loading branch information
osben committed Jun 8, 2020
1 parent 8386ba1 commit e8d5be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

// Удаляем отзывы
Expand Down

0 comments on commit e8d5be8

Please sign in to comment.