inc/record.inc.php
changeset 40 ee5300058c9d
parent 37 b785e54690ce
child 47 ae140472d97c
equal deleted inserted replaced
39:7c2b82bff121 40:ee5300058c9d
  1030            $add .=" AND domains.name LIKE '".$letterstart."%' ";
  1030            $add .=" AND domains.name LIKE '".$letterstart."%' ";
  1031         } elseif ($letterstart==1) {
  1031         } elseif ($letterstart==1) {
  1032            $add .=" AND substring(domains.name,1,1) REGEXP '^[[:digit:]]'";
  1032            $add .=" AND substring(domains.name,1,1) REGEXP '^[[:digit:]]'";
  1033         }
  1033         }
  1034 
  1034 
  1035         $query = 'SELECT count(distinct zones.domain_id) as zone_count FROM zones, domains WHERE zones.domain_id = domains.id '.$add;
  1035         if (level(5))
       
  1036         {
       
  1037                 $query = 'SELECT count(distinct domains.id) as zone_count FROM domains WHERE 1 '.$add;
       
  1038         }
       
  1039         else
       
  1040         {
       
  1041                 $query = 'SELECT count(distinct zones.domain_id) as zone_count FROM zones, domains WHERE zones.domain_id = domains.id '.$add;
       
  1042         }
  1036         $numRows = $db->queryOne($query);
  1043         $numRows = $db->queryOne($query);
  1037         return $numRows;
  1044         return $numRows;
  1038 }
  1045 }
  1039 
  1046 
  1040 /*
  1047 /*