<?php
require('path.inc.php');

$sql ="select * from fke_borough_log";
$query->open($sql);
while ($rs = $query->next()){
	$targetid = $rs['new_id'];
	$afromid = $rs['old_id'];
	$housesell = new HouseSell($query);
	$housesell->db->execute("update ".$housesell->tName." set borough_id = $targetid where borough_id = $afromid" );
	$houserent = new HouseRent($query);
	$houserent->db->execute("update ".$houserent->tName." set borough_id = $targetid where borough_id = $afromid" );
	$member = new Member($query);
	$member->db->execute("update ".$member->tNameBrokerInfo." set borough_id = $targetid where borough_id = $afromid ");
	$member->db->execute("update ".$member->tNameOwnerInfo." set borough_id = $targetid where borough_id = $afromid ");
}
exit("Íê³ÉÇ¨ÒÆ");
?>