[feladat @ 127]
Bugfix for ticket:5 : Modified the query which searches zones to also find empty zones by adding a LEFT JOIN.
--- a/inc/record.inc.php Tue Feb 19 19:45:47 2008 +0000
+++ b/inc/record.inc.php Mon Mar 03 20:32:33 2008 +0000
@@ -1305,16 +1305,15 @@
}
$sqlq = "SELECT domains.id, domains.name, count(records.id) AS numrec, zones.owner, records.domain_id
- FROM domains, records, zones
- WHERE domains.id = records.domain_id
- AND zones.domain_id = domains.id
+ FROM domains LEFT JOIN records ON domains.id = records.domain_id, zones
+ WHERE zones.domain_id = domains.id
AND domains.name LIKE ".$db->quote($question)."
GROUP BY domains.id, domains.name, zones.owner, records.domain_id";
$result = $db->query($sqlq);
$ret_d = array();
while ($r = $result->fetchRow())
{
- if(xs($r['domain_id']))
+ if(xs($r['id']))
{
$ret_d[] = array(
'id' => $r['id'],