diff -r 7c2b82bff121 -r ee5300058c9d inc/record.inc.php --- 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; }