ipdb_ck seems to thing several of my regions are orphaned when they're
not. Also, it calls roots orphans.
I suggest the following query does the right thing:
SELECT
id, name
FROM regiontable
WHERE
parent != 0 AND
parent NOT IN (SELECT id FROM regiontable)
of course, this won't work for mysql.
PS: I plan to send out ipdbDoctor soon.