From aac99c598e4a8deaad00353268937f7bd4a60d22 Mon Sep 17 00:00:00 2001 From: Andre Cianfarani Date: Tue, 4 Apr 2006 04:38:06 +0000 Subject: [PATCH] ajout fonction pour recup description d'une cate --- htdocs/categories/categorie.class.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 108ceb36019..3abd0c0affa 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -422,7 +422,19 @@ class Categorie return -1; } } - + /** + * retourne la description d'une catégorie + */ + function get_desc ($cate) + { + $sql = "SELECT description FROM ".MAIN_DB_PREFIX."categorie "; + $sql .= "WHERE rowid = '".$cate."'"; + + $res = $this->db->query ($sql); + $n = $this->db->fetch_array ($res); + + return ($n[0]); + } /** * La catégorie $fille est-elle une fille de cette catégorie ? */