inc/record.inc.php
changeset 134 a8228f676bf7
parent 133 7863d881b8a5
child 135 3673b1c9246c
--- a/inc/record.inc.php	Sun Apr 06 18:54:52 2008 +0000
+++ b/inc/record.inc.php	Mon Apr 07 19:11:03 2008 +0000
@@ -599,10 +599,9 @@
 					domains.name AS name, 
 					domains.master AS master_ip,
 					count(records.domain_id) AS record_count
-					FROM domains, records 
+					FROM domains LEFT OUTER JOIN records ON domains.id = records.domain_id 
 					WHERE domains.id = " . $db->quote($zone_id) . "
-					AND domains.id = records.domain_id 
-					GROUP BY domains.id";
+					GROUP BY domains.id, domains.type, domains.name, domains.master";
 		$result = $db->query($query);
 		if (PEAR::isError($result)) { error($result->getMessage()); return false; }