Skip to content

Instantly share code, notes, and snippets.

@vincentvdk
Created July 23, 2014 07:02
Show Gist options
  • Save vincentvdk/112b3925bfac63701a3d to your computer and use it in GitHub Desktop.
Save vincentvdk/112b3925bfac63701a3d to your computer and use it in GitHub Desktop.
ona query
select concat(d.name, '.', if (b.name is null, '', b.name + '.'), a.name) from `dns` d, `domains` a
left join `domains` b on b.id = a.parent_id
where d.domain_id = a.id
limit 0, 500;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment