From b580b9ffd8ea2e2b5d175d3a195ebcfc43d33b88 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 13 Jul 2004 16:56:37 +0000 Subject: [PATCH] Ajout fonction remove_fournisseur --- htdocs/product.class.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/htdocs/product.class.php b/htdocs/product.class.php index 6a164ea7218..b105934fcf9 100644 --- a/htdocs/product.class.php +++ b/htdocs/product.class.php @@ -486,6 +486,25 @@ class Product * * */ + Function remove_fournisseur($user, $id_fourn) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_fournisseur "; + $sql .= " WHERE fk_product = $this->id AND fk_soc = $id_fourn;"; + + if ($this->db->query($sql) ) + { + return 1; + } + else + { + print $this->db->error() . ' in ' . $sql; + return -1; + } + } + /* + * + * + */ Function create_stock($id_entrepot, $nbpiece) {