$nodeType = 'district';
        break;
    case "district":
        $nodeKeyColumn = 'ID';
        $nodeLabelColumn = 'Name';
        $nodeType = 'city';
        break;
}
while ($row = mysql_fetch_array($result)) {
    $record = new EBARecord($row[$nodeKeyColumn]);
    $record->add("key", $row[$nodeKeyColumn]);
    $record->add("label", $row[$nodeLabelColumn]);
    $record->add("type", $nodeType);
    if ($nodeKey2Column != "") {
        $record->add("key2", $row[$nodeKey2Column]);
    } else {
        $record->add("key2", '');
    }
    if ($nodeType == 'city') {
        $record->add("nodetype", "leaf");
        $record->add("haschildren", "false");
    } else {
        $record->add("nodetype", "node");
        $record->add("haschildren", "true");
    }
    $getHandler->add($record);
}
$getHandler->CompleteGet("latin1");
?>