diff -r df46fd74c2ee -r 41d05ff53708 inc/record.inc.php --- a/inc/record.inc.php Thu Mar 27 21:10:34 2008 +0000 +++ b/inc/record.inc.php Fri Mar 28 21:40:42 2008 +0000 @@ -152,7 +152,7 @@ } else { if (validate_input($zoneid, $type, $content, $name, $prio, $ttl) ) { $change = time(); - $query = "INSERT INTO records VALUES (''," + $query = "INSERT INTO records (domain_id, name, type, content, ttl, prio, change_date) VALUES (" . $db->quote($zoneid) . "," . $db->quote($name) . "," . $db->quote($type) . "," @@ -324,10 +324,10 @@ $hm = $GLOBALS['HOSTMASTER']; $ttl = $GLOBALS['DEFAULT_TTL']; - $query = "INSERT INTO records VALUES (''," + $query = "INSERT INTO records (domain_id, name, content, type, ttl, prio, change_date) VALUES (" . $db->quote($domain_id) . "," . $db->quote($domain) . "," - . "'SOA'," + . $db->quote('SOA')."," . $db->quote($ns1.' '.$hm.' 1') . "," . $db->quote($ttl) . ", 0, " @@ -350,7 +350,7 @@ $ttl = $GLOBALS["DEFAULT_TTL"]; } - $query = "INSERT INTO records VALUES (''," + $query = "INSERT INTO records (domain_id, name, type, content, ttl, prio, change_date) VALUES (" . $db->quote($domain_id) . "," . $db->quote($name) . "," . $db->quote($type) . "," @@ -358,7 +358,6 @@ . $db->quote($ttl) . "," . $db->quote($prio) . "," . $db->quote($now) . ")"; - echo "
" . $query . ""; $response = $db->query($query); if (PEAR::isError($response)) { error($response->getMessage()); return false; } } @@ -709,7 +708,7 @@ LEFT JOIN zones ON domains.id=zones.domain_id LEFT JOIN records ON records.domain_id=domains.id WHERE 1=1".$sql_add." - GROUP BY domains.name, domains.id + GROUP BY domains.name, domains.id, domains.type ORDER BY domains.name"; $db->setLimit($rowamount, $rowstart);