inc/record.inc.php
changeset 134 a8228f676bf7
parent 133 7863d881b8a5
child 135 3673b1c9246c
equal deleted inserted replaced
133:7863d881b8a5 134:a8228f676bf7
   597 
   597 
   598 		$query = "SELECT 	domains.type AS type, 
   598 		$query = "SELECT 	domains.type AS type, 
   599 					domains.name AS name, 
   599 					domains.name AS name, 
   600 					domains.master AS master_ip,
   600 					domains.master AS master_ip,
   601 					count(records.domain_id) AS record_count
   601 					count(records.domain_id) AS record_count
   602 					FROM domains, records 
   602 					FROM domains LEFT OUTER JOIN records ON domains.id = records.domain_id 
   603 					WHERE domains.id = " . $db->quote($zone_id) . "
   603 					WHERE domains.id = " . $db->quote($zone_id) . "
   604 					AND domains.id = records.domain_id 
   604 					GROUP BY domains.id, domains.type, domains.name, domains.master";
   605 					GROUP BY domains.id";
       
   606 		$result = $db->query($query);
   605 		$result = $db->query($query);
   607 		if (PEAR::isError($result)) { error($result->getMessage()); return false; }
   606 		if (PEAR::isError($result)) { error($result->getMessage()); return false; }
   608 
   607 
   609 		if($result->numRows() != 1) {
   608 		if($result->numRows() != 1) {
   610 			error(_('Function returned an error (multiple zones matching this zone ID).'));
   609 			error(_('Function returned an error (multiple zones matching this zone ID).'));