From 5acf0341b28286b34b62e2479fafe442c003c300 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 6 Apr 2006 12:20:30 +0000 Subject: [PATCH] Ajout fonction num_comments --- htdocs/telephonie/lignetel.class.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/htdocs/telephonie/lignetel.class.php b/htdocs/telephonie/lignetel.class.php index 6953f54cb75..15c90af2959 100644 --- a/htdocs/telephonie/lignetel.class.php +++ b/htdocs/telephonie/lignetel.class.php @@ -97,6 +97,27 @@ class LigneTel { * * */ + function num_comments() + { + $num_comments = 0; + + /* Commentaires */ + $sql = "SELECT fk_ligne "; + $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_ligne_comments"; + $sql .= " WHERE fk_ligne = ".$this->id; + $resql = $this->db->query($sql); + + if ($resql) + { + $num_comments = $this->db->num_rows($resql); + $this->db->free($resql); + } + return $num_comments; + } + /* + * + */ + function send_mail($user, $commentaire, $statut) { /*