1303 ); |
1303 ); |
1304 } |
1304 } |
1305 } |
1305 } |
1306 |
1306 |
1307 $sqlq = "SELECT domains.id, domains.name, count(records.id) AS numrec, zones.owner, records.domain_id |
1307 $sqlq = "SELECT domains.id, domains.name, count(records.id) AS numrec, zones.owner, records.domain_id |
1308 FROM domains, records, zones |
1308 FROM domains LEFT JOIN records ON domains.id = records.domain_id, zones |
1309 WHERE domains.id = records.domain_id |
1309 WHERE zones.domain_id = domains.id |
1310 AND zones.domain_id = domains.id |
|
1311 AND domains.name LIKE ".$db->quote($question)." |
1310 AND domains.name LIKE ".$db->quote($question)." |
1312 GROUP BY domains.id, domains.name, zones.owner, records.domain_id"; |
1311 GROUP BY domains.id, domains.name, zones.owner, records.domain_id"; |
1313 $result = $db->query($sqlq); |
1312 $result = $db->query($sqlq); |
1314 $ret_d = array(); |
1313 $ret_d = array(); |
1315 while ($r = $result->fetchRow()) |
1314 while ($r = $result->fetchRow()) |
1316 { |
1315 { |
1317 if(xs($r['domain_id'])) |
1316 if(xs($r['id'])) |
1318 { |
1317 { |
1319 $ret_d[] = array( |
1318 $ret_d[] = array( |
1320 'id' => $r['id'], |
1319 'id' => $r['id'], |
1321 'name' => $r['name'], |
1320 'name' => $r['name'], |
1322 'numrec' => $r['numrec'], |
1321 'numrec' => $r['numrec'], |