{select zone_name from DnsRecord_zonetag where zone_name = '$zone$'}
{select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"')
when lower(type) = 'soa' then concat_ws(' ', data, resp_person, serial, refresh, retry, expire, minimum)
else data end from DnsRecord_zonetag inner join DnsRecord_record on DnsRecord_record.zone_tag_id = DnsRecord_zonetag.id and DnsRecord_zonetag.zone_name = '$zone$' and DnsRecord_record.host = '$record$' where DnsRecord_zonetag.status = 'on' and DnsRecord_record.status = 'on'}";