From d961c56f516641f91e7e4ac67f284b50e42def5d Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 12 Jul 2007 06:57:05 +0000 Subject: [PATCH] Ajoutmethode fetch --- .../telephonie.tarif.grille.class.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/htdocs/telephonie/telephonie.tarif.grille.class.php b/htdocs/telephonie/telephonie.tarif.grille.class.php index 2c692fa42f0..807d3f2620b 100644 --- a/htdocs/telephonie/telephonie.tarif.grille.class.php +++ b/htdocs/telephonie/telephonie.tarif.grille.class.php @@ -51,6 +51,28 @@ class TelephonieTarifGrille { { $this->db = $_DB; } + /** + \brief Lecture de l'objet + + */ + function Fetch($id) + { + $sql = "SELECT d.libelle , d.type_tarif"; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_tarif_grille as d"; + $sql .=" WHERE rowid = $id;"; + $resql = $this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + + $this->id = $id; + $this->libelle = stripslashes($obj->libelle); + $this->type = $obj->type_tarif; + + $this->db->free($resql); + } + + } /* \brief Creation d'une nouvelle grille */