class Product{
public function delete(int $product_id, int $shop_id){
//...например, грубо .... WHERE `id` = ? AND `shop_id` = ?
}
}
$obj->delete($product_id, $shop_id);
class Product{
public function delete(int $product_id){
//...
}
}
$now = $obj->getById($product_id);
if($now->shop_id == $shop_id){
$obj->delete($product_id);
}
$obj->delete($product_id);