Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Select a.id as a_id, a.zone as a_zone, a.parent as a_parent, coalesce((CASE a.parent WHEN 0 THEN 1 ELSE null END), (CASE b.parent WHEN 0 THEN 2 ELSE 3 END) ) as level, coalesce((CASE a.parent WHEN 0 THEN a.id ELSE null END), (CASE b.parent WHEN 0 THEN a.parent ELSE b.parent END) )as sort_value, coalesce((CASE a.parent WHEN 0 THEN a.zone ELSE null END), (CASE b.parent WHEN 0 THEN b.zone ELSE c.zone END) )as sort_desc from zones a inner join zones b on (CASE a.parent WHEN 0 THEN a.id ELSE a.parent END) = b.id left outer join zones c on b.parent > 0 and b.parent = c.id order by sort_desc, level, a.id, b.id
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|How can I update information to the database when there information is dynamic not static?||18||60|
|How do uses indexes to maximize MySQL Searches||14||69|
|Complex MySQL Query||2||39|
|How to use 2 ON statements in inner join||3||27|