php access数据导入mysql
程序员文章站
2022-05-22 20:20:19
...
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] ); /*这里是插入语句了*/ } ?>