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

$sql ="select * from FK_Brokers_Shop ";
$query_mssql->open($sql);

while ($rs = $query_mssql->next()) {
	$broker_id = $query_mssql2->getValue('select Brokers_ID from FK_User_Brokers where Brokers_LoginNum =\''.$rs['Login_Num'].'\'');
	$created = $rs['Add_Time']?MyDate::transform('timestamp',$rs['Add_Time']):"";
	$fieldArray = array(
			'broker_id'=>$broker_id,
			'shop_name'=>$rs['Shop_Name'],
			'shop_url'=>"http://shop.系统.cc/".$broker_id,
			'shop_notice'=>$rs['Shop_News'],
			'shop_style'=>'default',
			'created'=>$created,
		);
	$query->insert('fke_shop_conf',$fieldArray);
}
print_r("网店配置数据导入完成");
exit;
?>