Ajout fonction CountContrats
This commit is contained in:
parent
8a3e146d23
commit
bfd158b2f4
@ -72,6 +72,26 @@ class TelephonieTarifGrille {
|
||||
$this->db->free($resql);
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
\brief Lecture de l'objet
|
||||
|
||||
*/
|
||||
function CountContrats()
|
||||
{
|
||||
$sql = "SELECT count(grille_tarif)";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat";
|
||||
$sql .=" WHERE grille_tarif='".$this->id."';";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
|
||||
$this->nb_contrats = $row[0];
|
||||
|
||||
$this->db->free($resql);
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
\brief Creation d'une nouvelle grille
|
||||
|
||||
Loading…
Reference in New Issue
Block a user