$hmap) {
    foreach($hmap as $child => $parent) {
      mysql_query("UPDATE wp_comments SET comment_parent = $parent WHERE comment_ID = $child AND comment_post_ID = $nid");
    }
  }
?>