From d9973e010fe2c72de7bab175fcc4494ef2615ebe Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 10 Feb 2005 11:51:09 +0000 Subject: [PATCH] =?UTF-8?q?Gestion=20de=20la=20mise=20=E0=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/telephonie/fournisseurtel.class.php | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/htdocs/telephonie/fournisseurtel.class.php b/htdocs/telephonie/fournisseurtel.class.php index 3324698245e..f243c4c5a4f 100644 --- a/htdocs/telephonie/fournisseurtel.class.php +++ b/htdocs/telephonie/fournisseurtel.class.php @@ -49,6 +49,28 @@ class FournisseurTelephonie { } return $res; } + /** + * + * + */ + function update() + { + $res = 0; + + $sql = "UPDATE ".MAIN_DB_PREFIX."telephonie_fournisseur"; + $sql .= " SET "; + $sql .= " email_commande = '".$this->email_commande."'"; + $sql .= ", num_client = '".$this->num_client."'"; + $sql .= ", class_commande = '".$this->methode_commande."'"; + + $sql .= " WHERE rowid = ".$this->id; + + if (! $this->db->query($sql) ) + { + $res = -1; + } + return $res; + } /** * * @@ -59,6 +81,7 @@ class FournisseurTelephonie { $sql = "SELECT f.rowid, f.nom, f.email_commande, f.commande_active"; $sql .= ", f.class_commande"; + $sql .= ", f.num_client"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; $sql .= " WHERE f.rowid = ".$this->id; @@ -69,6 +92,7 @@ class FournisseurTelephonie { $obj = $this->db->fetch_object(0); $this->nom = stripslashes($obj->nom); + $this->num_client = $obj->num_client; $this->email_commande = $obj->email_commande; $this->commande_enable = $obj->commande_active; $this->class_commande = $obj->class_commande;