php access数据导入mysql,大家应该都会的,勿喷哦,有错就改哈

Open($connstr); 
$rs = @new COM("ADODB.RecordSet"); 
$rs->Open("select * from TABLE_NAME",$conn,1,3); 
while(!$rs->eof){
	$ftitle[]=iconv('GB2312','UTF-8',$rs->Fields["c_title"]->Value);
	$fcontent[]=iconv('GB2312','UTF-8',$rs->Fields["c_content"]->Value);
	$fcdate[]=strtotime($rs->Fields["c_date"]->Value);
	$rs->Movenext(); //将记录集指针下移 	
} 
$rs->close(); 
for ($i=0;$i$ftitle[$i],
	"b_content"=>$fcontent[$i],
	"b_date"=>$fcdate[$i]
	);
	/*这里是插入语句了*/
}
?>
登录后复制
09-07 03:45