From a6a3aeb949609f237f09683f6aa3172b8a2e020e Mon Sep 17 00:00:00 2001 From: domi <> Date: Sat, 25 Aug 2012 10:49:55 +0000 Subject: [PATCH] Add method to count all domains --- bureau/class/m_dom.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 304a96c2..e20fdf59 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -1210,6 +1210,19 @@ class m_dom { } } + /* ----------------------------------------------------------------- */ + /** + * Count all domains, for all users + */ + function count_domains_all() { + global $db,$err,$cuid; + $db->query("SELECT COUNT(*) AS count FROM domaines;"); + if ($db->next_record()) { + return $db->f('count'); + } else { + return 0; + } + } /* ----------------------------------------------------------------- */ /**