Ajoutmethode fetch

This commit is contained in:
Rodolphe Quiedeville 2007-07-12 06:57:05 +00:00
parent 9794abab0a
commit d961c56f51

View File

@ -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
*/