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

//计算二手房A+房源的单价比
$sql ="select * from fke_borough";
$query->open($sql);
while ($rs = $query->next()) {
	$borough_pic_num = $query_mysql->getValue("select count(*) as num from fke_borough_pic where borough_id = ".$rs['id']);

	$borough_draw_num = $query_mysql->getValue("select count(*) as num from fke_borough_draw where borough_id = ".$rs['id']);
	
	$query_mysql->execute('update fke_borough set layout_picture='.$borough_pic_num.',layout_drawing='.$borough_draw_num.' where id='.$rs['id']);
}

print_r("小区图片数量数据导入完成");
exit;
?>