inc/record.inc.php
changeset 40 ee5300058c9d
parent 37 b785e54690ce
child 47 ae140472d97c
--- a/inc/record.inc.php	Thu Jul 26 14:31:38 2007 +0000
+++ b/inc/record.inc.php	Mon Aug 13 22:05:06 2007 +0000
@@ -1032,7 +1032,14 @@
            $add .=" AND substring(domains.name,1,1) REGEXP '^[[:digit:]]'";
         }
 
-        $query = 'SELECT count(distinct zones.domain_id) as zone_count FROM zones, domains WHERE zones.domain_id = domains.id '.$add;
+        if (level(5))
+        {
+                $query = 'SELECT count(distinct domains.id) as zone_count FROM domains WHERE 1 '.$add;
+        }
+        else
+        {
+                $query = 'SELECT count(distinct zones.domain_id) as zone_count FROM zones, domains WHERE zones.domain_id = domains.id '.$add;
+        }
         $numRows = $db->queryOne($query);
         return $numRows;
 }